L
linganmm
Guest
Hi, all,
We have a SDI application that needs to support multiple languages. What we need is to enable users to specify the adopted language through a mouse click. For example, by clicking Tool->"change language to Chinese", All the displayed strings including menu captions and texts in the prompted dialogs will switch from English to Chinese, WITHOUT restarting the program.
Followed the instructions searched from internet, we first inserted a copy to IDR_MAINFRAME and set its language to Chinese, and then replaced all strings in it by Chinese characters.
In the handler function of Tool->"change language to Chinese", we change the UI language by:
SetThreadUILanguage(MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT));
In this way, the language of prompted dialogs does change to Chinese, for example, before clicking Tool->"change language to Chinese", File->New will prompt file dialog like this:
After clicking Tool->"change language to Chinese", the prompted file dialog is like this.
HOWEVER, the menu itself is not changed, as highlighted by the yellow line.
Does anyone know how to change the language of the menu captions dynamically?
Thank you very much!
Continue reading...
We have a SDI application that needs to support multiple languages. What we need is to enable users to specify the adopted language through a mouse click. For example, by clicking Tool->"change language to Chinese", All the displayed strings including menu captions and texts in the prompted dialogs will switch from English to Chinese, WITHOUT restarting the program.
Followed the instructions searched from internet, we first inserted a copy to IDR_MAINFRAME and set its language to Chinese, and then replaced all strings in it by Chinese characters.
In the handler function of Tool->"change language to Chinese", we change the UI language by:
SetThreadUILanguage(MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT));
In this way, the language of prompted dialogs does change to Chinese, for example, before clicking Tool->"change language to Chinese", File->New will prompt file dialog like this:
After clicking Tool->"change language to Chinese", the prompted file dialog is like this.
HOWEVER, the menu itself is not changed, as highlighted by the yellow line.
Does anyone know how to change the language of the menu captions dynamically?
Thank you very much!
Continue reading...