Enjoy translating your pods with the language files in the pod directory!
Very new. Working very well for us, but proceed w/ caution and provide any feedback and we'll update accordingly!
Say you have an activities route
ember g route activities -p
ember g locale-pod activities -p
app/
app/activities
app/activities/route.js
app/activities/template.hbs
app/activities/locales/[lang].js
app/locales/pods/[lang].js
import Ember from 'ember';
import PodLocales from 'stetson/locales/pods/en';
export default Ember.$.extend(true, PodLocales, {
"anything-else": {
"could-go": "here",
"if-you": "have no pod translations"
}
});
ember install ember-cli-locales-pods
You need to add the import file into wherever you pass on your translations to your translation library as shown above. This addon simple combines all of your locales into a single hash for you to import somewhere else.
To generate locales into your pod - just run:
ember g locale-pod [path] -p
To provide specify a language (default to en
) add lang:[lang]:
ember g locale-pod [path] lang:de -p
Enjoy translating your pods! :)