Multilingual runtime resources (.lng)

This release introduces a new mechanism for handling multilingual resources in the following runtime modules:

Currently, the following runtime module does NOT support multilingual resources:

  • PowerServer Web APIs

    The messages returned from PowerServer Web APIs will display in English (for EN version) or Japanese (for JP version).

How to support multilingual resources in PowerBuilder runtime files

Text resources previously embedded directly in runtime DLLs are now separated into independent .lng language package files, enabling runtime language switching and simplified localization without recompiling the runtime.

Note

Runtime text resources include only application-defined text. They do not include system-provided UI text, such as message box button labels (for example, OK and Cancel) or text displayed in system dialog boxes, such as print dialog boxes, file save/open dialog boxes. The language of such text is automatically determined by the Windows display language on the client machine.

  • Each supported language is stored in a dedicated .lng file (e.g., english.lng, french.lng), in the runtime language folder, for example, C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime [version]\lang.

    Supported languages include English, Chinese, Danish, Dutch, French, German, Italian, Norwegian, Spanish, and Swedish.

  • To manually deploy the language file, make sure to copy the lang folder, and make sure the lang folder contains the english.lng file and other required language files.

    Note that at least english.lng (for EN version) or japanese.lng (for JP version) must be existing for proper runtime display.

    If the application fails to load any language files at runtime, some resources will not display properly, for example, text in system dialogs may not display, and some message boxes may display "Message xxx not in resources file".

  • To use the user-defined language file, name the file as custom.lng and place it in the lang folder.

    • By default, a custom.lng file is already provided in the lang folder (for example, C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 25.1.0.6180\lang).

    • Do not change the file name or location of the custom.lng file. Only one user-defined language file is allowed.

    • Initially, it contains the same content as english.lng and the text resources of the launcher installer (Text IDs starting with "IDS_INSTALLER_CAL_").

    • Its content format is Text ID, Text Description. Modify only the text descriptions. Do not modify the text IDs.

    • Back up the custom.lng file before modifying its content.

How to package the language file for native C/S apps

The PowerBuilder Runtime Packager allows you to select which language packages to include in the deployment. For the English version, English is always selected and cannot be deselected (for the Japanese version, Japanese is mandatory).

How to package the language file for PowerClient/PowerServer apps

All of the language files will be automatically packaged and deployed to the server when the PowerClient/PowerServer project is deployed, and automatically downloaded with the runtime when the application is run.

How to programmatically set language

The developer can set or query the current runtime language programmatically using SetLanguage and GetLanguage.

Language changes will take effect immediately after the SetLanguage function is executed.

If the specified language type or file is invalid, the runtime language falls back to English (for EN version) or Japanese (for JP version).