PowerBuilder provides resources for international developers that include localized runtime resources and the Translation Toolkit.
Localized runtime resources
The runtime resources are delivered as independent .lng language package files (for example, english.lng, french.lng, japanese.lng). These files allow you to deploy PowerBuilder applications with standard runtime dialog boxes and messages in the local language. Runtime text resources are separated from runtime DLLs, enabling easier localization and runtime language switching without recompiling the runtime.
The multilingual PowerBuilder runtime resources handle language-specific data at runtime and control the language used for standard dialog boxes and user interface elements, such as day and month names in spin controls.
PowerBuilder provides a runtime-based localization mechanism that controls the language used by standard dialogs, system messages, and other built-in runtime text. Localization is implemented by externalizing runtime text resources into independent language package files, rather than embedding them in runtime DLL files.
This mechanism applies to PowerBuilder Runtime files and Cloud App Launcher. PowerServer Web APIs do not support multilingual resources; their messages are fixed to English in the EN version and Japanese in the JP version.
Each supported language is represented by a dedicated .lng file that maps internal text identifiers to localized text. At runtime, PowerBuilder loads the language file and resolves all language-sensitive runtime content through it. Language changes take effect immediately and do not require recompiling or replacing runtime components.
To ensure predictable behavior, at least one language file is required. If no language resource is available or valid, the runtime automatically falls back to English (for EN version) or Japanese (for JP version).
Localized PFC libraries
The PFC is now available at https://github.com/OpenSourcePFCLibraries.
In order to convert an English language PFC-based application to another language such as Spanish, you need multiple components. You need to test the application on a computer running the localized version of the operating system with appropriate regional settings. You must also obtain or build localized PFC libraries and install the localized PowerBuilder runtime resources. When you deploy the application, you must deploy it to a computer running a localized version of the operating system, and you must deploy the localized runtime resources.
You can translate the PFC libraries with the Translation Toolkit. Localized PFC libraries are the same as the original PFC libraries except that strings that occur in windows, menus, DataWindow objects, dialog boxes, and other user interface elements, and in runtime error messages, are translated into the local language. These include, for example, day and month names in the Calendar service. All services remain otherwise the same. In a Spanish PFC application, error messages displayed by the PFC are in Spanish, month names in the Calendar service are in Spanish, column headers in DataWindow objects and Menu items are in Spanish, and so on.
The Translation Toolkit adds a string in the format %LANGUAGE% to the comment associated with every object that contains a translated string. For example, if you look at a PFC library that has been translated into Spanish in the List view in the Library painter, you will notice the string %SPANISH% at the beginning of the comment for many objects.
The dictionaries used to translate the PFC libraries into each language are provided with the Translation Toolkit. You can use the dictionaries to translate the rest of your application into a local language using the Translation Toolkit, and you can view the dictionary in a text editor to see which strings have been translated.
The localized PFC libraries work in coordination with the localized runtime resources, regional settings, and the localized operating system.
Regional settings
PowerBuilder always uses the system's regional settings, set in the Windows Control Panel, to determine formats for the Date and Year functions, as well as date formats to be used by the SaveAs function. The use of these regional settings is independent of the use of PowerBuilder localized runtime resources or PFC libraries.
The regional settings are also used to determine behavior when using Format and Edit masks. For more information, see the section called “Defining display formats” in Users Guide.
Localized operating system
The localized operating system is required for references to System objects, such as icons and buttons, that are referenced using enumerated types in PowerBuilder, such as OKCancel!, YesNo!, Information!, and Error!. These enumerated types rely on API calls to the local operating system, which passes back the appropriate button, icon or symbol for the local language. For example, if you use the OKCancel! argument in a MessageBox function, the buttons that display on the message box are labeled OK and Cancel if the application is not running on a localized operating system.
The Translation Toolkit is a set of tools designed to help you translate PowerBuilder applications into other languages. It includes a standalone translator tool that is used by the person or group translating the text of the application.
When you use the Toolkit to create a project, a copy of each of your application's source libraries is created for each project. The application's original source libraries are not changed.
How the Toolkit works
You work with the phrases (one or more words of text) in an application. These phrases are in the application's object properties, controls, and scripts.
You use the tools to:
-
Extract phrases from the project libraries
-
Present the phrases for translation
-
Substitute translated phrases for the original phrases in the project libraries
Using the translated project libraries, you use PowerBuilder to build the translated application.
For more information, see the Translation Toolkit help file (%PowerBuilderInstallationPath%\TransTlk\ptt.chm).


