Once your application is internationalized, you can create its localized versions for the different foreign markets in which you want to distribute it.
Ideally, during internationalization steps, resources in your application have been isolated into a resource DLL that contains form files (.dfm in VCL applications) and a resource file.
- Localizing functionality
Localization may include functionality customization. For example, a financial application may require modification for the tax laws in different countries.
- Localizing UI design
Creating an application for several foreign markets, you should provide that your design of such UI features as texts, graphic images, data formats, sorting order, and other satisfies to some localization requirements important during translation.
- Creating resource DLL projects for additional languages
You can use the Resource DLL Wizard to create resource DLL projects for additional languages. Each created resource DLL project contains the .dfm form file that stores forms and other GUI resources and the RC resource file containing resource strings declared in resourcestring sections. (See Creating Resource DLLs.) The Resource DLL Wizard creates each resource DLL project in a separate subdirectory specific to the target locale. The first two characters indicate the target language, and the third character indicates the country of the locale (see Language Culture Names, Codes, and ISO Values). For example, for "German - Germany" locale the subdirectory will be
- Translating resource strings in resource DLL projects
The next step is translation of resource strings in .dfm form files and RC resource files. In the Project Manager, double-click your .dfm form or RC resource file to open it in the Translation Editor and translate the relevant strings.
Translators, who do not have the installed RAD Studio IDE, can use the stand-alone External Translation Manager (instead of the IDE's internal Translation Editor) to translate resource strings in your resource DLL projects.
Note: In a resource DLL project, you cannot add or delete GUI components.
- Build resource DLLs for translated languages
Run the Project > Build All Projects command to build all projects in the current project group. This command builds all resource DLLs for all resource DLL projects created by the Resource DLL Wizard for all additional languages. For example, if you have an application with the
Test.exeexecutable file and the locale for the resource DLL project is "German - Germany", then RAD Studio IDE will build the
Test.DEUresource DLL in the same root project group directory as the main
Test.exeapplication executable file.
Deploying localized applications
In your localized project you have created a number of localized resource DLLs that must be distributed alongside your main application executable. For example, if your application has the
Test.exe executable file and you
have built the
Test.DEU resource DLL for the "German - Germany" locale, then you should deploy the
Test.exe executable file together with this localized
Test.DEU resource DLL. (See Deploying Localized Applications for more details.)
How applications find localized resource DLLs
When you start up a localized application, it tries to find and load the localized resource DLL. To find the localized resource DLL, the application first obtains the preferred language name list. Using this list, the application (having the
Test.exe executable file) attempts to find the localized resource DLL having one of the following extensions:
Test.XYZ. If the " locale override" key having the
XYZvalue is defined for the
Test.exeexecutable in the Windows registry.
The "locale override" key can be added under the
HKEY_LOCAL_MACHINE\Software\Embarcadero\Localesregistry keys. The Name field of "locale override" key should be a string value identifying your application's path and the
Test.exeexecutable filename. The Data value should be equal to the desired extension
XYZof your localized resource DLL.
ABrepresents the language code and
CDrepresents the region code.
EFGrepresents the three-letter language code. (See the ISO 639x Values in Language Culture Names, Codes, and ISO Values.)
If the application finds the localized resource DLL file at one of these steps, the search stops and the application loads the found resource DLL.
For example, if the UILocale is set to German - Germany and the "locale override" key has the value
XYZ, then running the
Test.EXE application, Windows will search for the following files in the directory from which
Test.XYZ Test.DE-DE Test.DE Test.DEU Test.DE