Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
Marcell Monteiro Cruz edited this page Dec 22, 2016 · 2 revisions

Welcome to the ember-i18n wiki!

Quick start:

Install ember-i18n

ember install ember-i18n

Generate translation:

ember generate locale es

Edit app/locales/es/translations.js

export default {
  'myTranslatedString': 'Hola amigo!'
}; 

Inject the i18n service in the route that you need the translation

// app/routes/application.js
export default Ember.Object.extend({
  i18n: Ember.inject.service()
});

Now you can access the translated string from the template with the "t" helper:

<h1>{{t 'myTranslatedString' }}</h1>

For more information and options see the other pages on the wiki.