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.
  • Add the languages to support.
Data Export

CSV files (universal text files) for Translators

  • File > Export
  • Press < Create a File > button.
  • Select “Text” (tab)
    • Character Set: Ansi (or preferably UTF8)
    • Delimiter: Tab
    • Quote: Double (or whatever is applicable to your data)
    • Context Column: First

Multilizer: Export Wizard - File

  • Press Next, for Options (take defaults), and select languages to export.

Multilizer: Export Wizard - Options

  • Open the file in a spreadsheet application:
    • In MS Excel: import file as Text (delimited text). Save file as XLS (Excel) to share this file with human translators.
    • In OpenOffice Calc: import file as Text CSV (Select “File of Type”, then Text CSV (*.csv, *.txt)). Select character set UTF-8 for most languages.

CSV file to import in OpenOffice containing UTF8 localization text

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.

Multilizer: Import Wizard - File

  • Add Context column to the list of columns. Move it up to be the in the first place.

Multilizer: Import Wizard - File

  • Add all the language columns existing in the import file. In this case, just add Korean. Place it in the correct order as it appear in the import file.

Multilizer: Import Wizard - 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.

Multilizer: Import Wizard - File

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
    • Generate localized version as usual (Project → Build Localized Item). No extra steps required.
    • Note: to view the localized version properly (especially for East Asian languages), you must have previously configured the Regional Settings' Language for Non-Unicode programs (see Setting Locale in Windows) to point to the target language (eg. East Asian language). For European languages, this is usually not necessary.
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:
  • 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.
    • Korean: HANGEUL_CHARSET
  • 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); 
  • If there is a need to change to Unicode, try the UTF-8 VCL utility which changes your application to Unicode without modifying your code: http://sourceforge.net/projects/utf8vcl
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”.
  • Select appropriate “Code Page conversion tables”.
Common Character Encodings
  • Bulgarian: Windows-1251 (Cyrillic)
  • Russian: Windows-1251 (Cyrillic)
  • Korean: EUC-KR or JOHAB
  • Western: Windows-1252 (Latin)