How to set the i18n.locale from within an initializer
问题 I would like to set 'i18n.locale' from within an initializer in EmberJS. I am using 1.12 via Ember-CLI with ember-i18n. I tried this import Ember from 'ember'; export function initialize(container, application) { Ember.set('i18n.locale', 'de'); } export default { name: 'user-locale', initialize: initialize } but am receiving Assertion Failed: Path 'i18n.locale' must be global if no obj is given. 回答1: You could get i18n as service:i18n and use instance-initializer to set i18n.locale . //app