我不知道为什么,但是不能让插件Ember-i18n工作,我该怎么做?
你可以在https://canary.ember-twiddle.com/736ba26820e429cd683a5eb54416996b?openFiles=routes.application.js%2C
下看到我的Ember Twiddle答案 0 :(得分:1)
All is ok but one point. The fallback language is en
and you didn't define the default. Also you didn't define anywhere that the default lang is de
.
Please do below in application route :
import Ember from 'ember';
export default Ember.Route.extend({
i18n: Ember.inject.service(),
beforeModel(){
this.set('i18n.locale', 'de');
}
});