Skip to content

Localization

Colin Basnett edited this page Dec 14, 2023 · 2 revisions

Submitting Translations

Translations are submitted to our online Weblate portal: https://weblate.darklightgames.com/

It is recommended that you reach out to the development team before submitting translations. Please do not submit translations unless you are a native speaker of the language.

Syncing Translations

Syncing the translations from Weblate to the your development version of the game is easy.

Prequisities

  1. Development Environment Installation
  2. virtualenv installed
  3. git installed

To sync the translations, simply run this batch file: %RODIR%/tools/i18n/sync.bat.

Note Weblate can sometimes take a while to "submit" recently made translations to the repository.

Font Generation

Unlike modern games that have native True Type font rendering built into their engines, Unreal Engine 2 renders fonts using what are called "bitmap fonts". Therefore, this means that adding or updating fonts requires the bitmap fonts to be generated via the game's SDK using a script.

Manually creating and maintaining this script would be a laborious and painful process, which is why we have a script that will generate the fonts used by the game, and you simply need to execute the script in the SDK whenever the fonts need to be updated.

Before starting, make sure that all of the fonts in the %RODIR%/DarkestHourDev/Fonts folder are installed on your machine locally.

Simply follow these steps:

  1. Run %RODIR%/tools/i18n/generate_fonts.bat.
  2. Copy Ctrl+C the EXEC ... command that is printed out in the command window.
  3. Open the RedOrchestra SDK.
  4. Click the Console button (it's near the bottom left)
  5. Paste Ctrl+Vthe command you copied earlier and press Enter

The fonts will now be generated, though it may take a while.

CJK Characters

Languages like Japanese, Chinese and Korean use logographic characters that represent ideas with a single character (e.g. "person" can be represented by "人"). As a result, there are tens of thousands of these characters. which means that generating a full font atlas for every possible CJK character is infeasible.

To remedy this, the font generation script will only generate the characters that are used in the translation files (in addition to the base unicode ranges defined in the fonts.yml file, for the language.

Clone this wiki locally