Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Dynamically switching language with customization enabled Collapse All
Subject Author Date
Peter Meier Feb 12, 2011 - 10:56 AM

How can I make my application dynamically switching the language when customization is enabled?


I am using ::SetThreadUILanguage to advise the CString::loadString to load the strings for menus and commands in different languages. Although the function works correctly, the strings are not being displayed, because the customization feature still holds the strings for the language that was active before. Only after I delete the Prof-UIS part of the registry below my app’s registry tree the strings are displayed correctly.


So what can I do to have the old strings discarded and replaced by the new ones programmatically? Is there a way to unload all the texts of commands?


Thank you


 

Technical Support Feb 14, 2011 - 1:20 AM

The LanguageSwitcher sample does exactly what you looking for.
The CString::LoadString() method is part of MFC and we cannot change its behavior. That’s why Prof-UIS uses the CExtResourceManager::LoadString() method instead. Of course all the command descriptions should be reset after choosing the preferred language in your app. The LanguageSwitcher sample application does this for all the commands, menu items and toolbar buttons.