Software Localization Using Multilizer
Executable Generation for Multilizer
Set project to generate .drc file for the project (Project > Options > Linker > Map File = Detailed). Always set this setting after adding new resource strings to the project. DRC files contain the resource strings that need to be mapped and are read by Multilizer.
Generate an .exe file by Build (Project > Build) in Delphi.
Run Multilizer and scan executable to find all strings to translate. NOTE: project executable and .drc file must be located in the same directory (eg: ezfit.exe, ezfit.drc) in order for Multilizer scan strings correctly.
Reset project to stop generating .drc file (Project > Options > Linker > Map File = Off). This avoids generating huge executable files.
Creating Multilizer Project
File > New.
Select target file, which should be an executable (.exe).
Select 'Delphi Binary file'.
VCL binary file options: Localized Files, Resource Files.
If this message appears, then follow instructions and make sure the .drc file is located in the save directory as the executable:
No Delphi resource file (.drc) is specified. It is recommended to specify the resource file.
You can localize "fit044wm.exe" file but Multilizer can't get the complete resource string context without the resource file.
To create a .drc file choose Project|Options|Linker from Delphi and check Detailed in the Map file radio group.
Data Export
CSV files (universal text files) for Translators
Data Import
From Excel
In Excel, save document as “Text (Tab delimited) (*.txt)” file.
In Multilizer, open the project which has the missing strings (or create a new project).
Import. From menu select File > Import. Choose file type “text file (*.txt)” as import file.
Select Import Method to be “By context first, then by value”. Select “Always” as the “Overwrite the current value” setting, and uncheck the “Import only if the value is not empty” and “Import only if the value does not equal to the native value” if necessary.
From Previous Multilizer Project (.mpr)
Open the project which has the missing strings (or create a new project).
Import. From menu select File > Import.
Select a previous Mutilizer project (.mpr) that contains the translated strings.
Select the required languages to import.
Import Options:
Import method: By Context first then by value, Context and native value must match (checked).
Overwrite the current value: Always, Import only if value is not empty (unchecked), Import only if the value does not equal the native value (unchecked).
Import Translation Status: Import the Do Not Translate status (checked), Import maximum length value (checked).
Finish, then Save new project.
Generating Translations with Multilizer
Using Unicode
Project > Targets > Edit (button)
Encodings (tab)
For Unicode only: right-click on language, and select correct encoding (Korean = UTF-16 Little Endian)
Generate localized version (Project > Build Localized Item).
Using ANSI Code Pages
General
Data Conversion
Enter data in MS Excel.
Save As “Unicode Text” (file type).
Open file with Notepad, copy special characters, then paste it into your application or a translation tool (like Multilizer).
Displaying Localized Applications
Displaying Text Properly Using Unicode
Use Unicode-enabled controls like TNT-Unicode-Controls.
Set Obj.Font.Charset to the appropriate language to display (where Obj is the control or object that needs translating). Note: Setting Font.Charset does not work for many VCL controls.
European Languages: ANSI_CHARSET (or OEM_CHARSET)
Korean: HANGEUL_CHARSET (or OEM_CHARSET)
Note: use OEM_CHARSET if the target version of Windows matches the target language. In other words, if the application translated to Korean is being run on a Korean version of Windows, then things display properly.
Modify your application so it works with Unicode instead of ANSI-Strings. Use one of these Unicode-enabled component sets:
-
-
Free of charge
Only Unicode for NT-2003
Unicode-File-Controls
Note: If you only get ??? instead of the correct text, use unicode-enabled controls (like ElPack or TNT-Controls). Setting Font.Charset does not work for many VCL controls.
Displaying Text Properly Using ANSI Code Pages
Usually, there is no need to switch to Unicode. There are Chinese, Korean, and Japanese Ansi code pages. The only difference is that you have to run the localized Japanese application on Japanese
OS, or any W2K/XP having Japanese set to the Non-Unicode application locale. Also you have to install IME for the language you are using. For any other aspect localization from English to Japanese is pretty much like from English to German.
Set Obj.Font.Charset to the appropriate language to display. Note: Setting Font.Charset does not work for many VCL controls.
If you only get ??? instead of the correct text, you have to switch your default-codepage of Windows to English. Setting Font.Charset does not work for many VCL controls.
For some languages (eg. Hebrew, Russian (Cyrillic)) even doing all of this does not change the ??? text (Delphi 7 bug). You would need to include the following in the Delphi project file (.dpr) at the beginning of the initialization code:
// Localization: force to use Locale System Default so all text is displayed correctly
// to fix Delphi7 bug (see Bug Report 2460: http://qc.borland.com/wc/qcmain.aspx?d=2460)
//ShowMessage(format('GetThreadLocale = %d, GetSystemDefaultLCID = %d, GetUserDefaultLCID = %d',
// [GetThreadLocale, GetSystemDefaultLCID, GetUserDefaultLCID]));
SetThreadLocale(LOCALE_SYSTEM_DEFAULT); // same as SetThreadLocale($0419);
-
Setting Locale in Windows
Control Panel > Regional and Language Options.
Languages tab.
Check checkbox “Install files for East Asian Languages”.
Advanced tab.
Set “Language for Non-Unicode programs”.
Common Character Encodings
Bulgarian: Windows-1251 (Cyrillic)
Russian: Windows-1251 (Cyrillic)
Korean: EUC-KR or JOHAB
Western: Windows-1252 (Latin)