Mastering PowerBuilder

HomePrevious Lesson: Course 3:: Session 27 :: Page 230
Next Lesson: Course 3:: Session 27 :: Page 250
Changing Languages Dynamically

Changing Languages Dynamically

You can deploy the application in two different ways. In the first method, deploy only one localized language per user. That means, deploy only French version for all users in France and German version for all users in Germany. In the second method, deploy all versions to all users and let the user select the language either at the startup or from within the application.

If you choose the second method, you need to develop a window to allow the user to choose the language. In this window you can either hard code all the language names that you are deploying or display the languages dynamically by reading from the INI file using NextLanguage() function available in the 'uo_Language_Manager' user object. Once the user selects the language name to use, set the language name by calling SetLanguage() available at 'uo_Language_Manager' and trigger "LanguageChanged" event available at w_frame window.

HomePrevious Lesson: Course 3:: Session 27 :: Page 230
Next Lesson: Course 3:: Session 27 :: Page 250