ember-i18next v0.2.0
To make working with i18next's capabilities easier and better encapsulate the library, the i18n service now exports all of i18next's public API. With this change, code like the following:
import Ember from 'ember';
import I18nMixin from '../mixins/i18n';
export default Ember.Route.extend(I18nMixin, {
// ...
afterModel: function (model) {
var translations = model.get('translations');
var i18next = this.get('i18n.i18next');
i18next.addResources(translations.get('locale'), 'namespace', translations.get('keys'));
}
});
Can be replaced with this instead:
import Ember from 'ember';
import I18nMixin from '../mixins/i18n';
export default Ember.Route.extend(I18nMixin, {
// ...
afterModel: function (model) {
var translations = model.get('translations');
var i18n = this.get('i18n');
i18n.addResources(translations.get('locale'), 'namespace', translations.get('keys'));
}
});