当应用程序语言更改时,我需要重新呈现我的主应用程序视图。我正在使用不支持观察的 ember-i18n,所以我做了一些工作来在语言和 lang 属性更改时更新视图。我在 ApplicationRoute 中的以下操作中切换 lang :
actions:
{
switchLang: function(lang){
this.get('controller.I18N').set('defaultLang', lang);
//this.notifyPropertyChange('lang');
},
},
但我不知道如何通知ProperyChange 来更新或重新呈现我的“applicationView”和模板?