Skip to content

How to localize ConsoleZ

Christophe Bucher edited this page Apr 18, 2016 · 3 revisions

If you want to contribute, clone this repository and do a pull request.

Add a new language

Localize ConsoleZ can be done in few steps:

  1. Create the language folder:

    • create a directory, named with the three-letter code (ISO 639-2/B) of the language, in /l10n/ folder

      create AAA folder

    • copy the file console.lws from any other language

      copy console.lws

  2. Use the program LocalizeRC to generate ini file. This file contains all string resources to translate.

    • launch LocalizeRC and open the file console.lws in your language folder

      create AAA folder

    • create the ini file

      create AAA folder

  3. Translate the string resources in ini file. For this, you only need a text editor (like notepad.exe).

    • edit the ini file (you can press the Open INI file for Edit button); you must replace the text at the right

      create AAA folder

  4. Create the localized RC file.

    • press the Create Output RC with INIbutton

    • if RC file is new, you will have the following message; otherwise LocalizeRC keeps previous positions and sizes modifications. Never modify a string in the RC file, it will be replaced by the string from ini file!

      create AAA folder

  5. If necessary, you can modify rectangle (position and size) of controls by editing the RC file.

    • Most controls are large sized and can go to the line. Labels cannot be configured to be vertically centered. So if you want to go to line, you must re-size them. To help, LocalizeRC warns for labels that could be truncated and provides a recommended rectangle.

      create AAA folder

  6. Build and verify that each message is not truncated.

  7. Commit the new files (only console.lws, console.ini and console.rc).

  8. Do a pull request.

You can repeat steps from 3 to 6 as many times as necessary.

Note the ini file and the RC file are stored in GitHub as UTF-8 with BOM! I don't find how to patch and visualize differences with default Unicode format (UCS-2 LE). So we use iconv to convert RC file from UTF-8 to UCS-2 LE during the build.

People that want to contribute but don't know how to modify a RC file or cannot compile (steps 5 and 6) can contact me in this issue. The RC file can be modified by another developer.

Correct or update an existing language

You can easily correct the translation from your web navigator! In this example, your user is named chrisz76 😉

  1. From your fork, in code tab, go to l10n folder: image

  2. go to language folder: image

  3. Edit the ini file: image image

  4. Modify and start a pull request: image

  5. Create pull request (this pull request targets your fork! I recommend not to merge and keep your master branch synchronized with cbucher master branch): image

  6. From your fork, in code tab, propose pull request to cbucher fork: image

image

Clone this wiki locally