jeudi 11 juin 2015

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.

Aucun commentaire:

Enregistrer un commentaire