开发者

Locale does not get change in titleWindow

开发者 https://www.devze.com 2023-02-17 21:11 出处:网络
I have some labels in a title window in my application. When i change locale it gets changed but labels in the titleWindow do not change. When I check the locale chain using resourceManager.loca开发者

I have some labels in a title window in my application. When i change locale it gets changed but labels in the titleWindow do not change. When I check the locale chain using resourceManager.loca开发者_如何转开发leChain it returns the array of locales and newly selected locale is on the zero index of it. I am finding no way to fix this problem.


Have you tried to override the resourcesChanged method from the TitleWindow?

override protected function resourcesChanged():void {
   super.resourcesChanged();
   //load the labels
   someComponent.label = resourceManager.getString('labels', 'THE_LABEL');
}

This method is called each time the ResourcesManager changes (dispatches a "change" event), including when the locale is updated.

0

精彩评论

暂无评论...
验证码 换一张
取 消