|
[*Back to Index*](index.md.html) |
|
|
|
LocTable |
|
======== |
|
This mod item allows you to specify a translation table that will be loaded to translate strings from the base game or strings from your mod. |
|
|
|
Localization works by replacing texts identified by their "localization IDs" with their translated variants. Texts sometimes contain tags, delimited in diamond brackets `<tag>`text`</tag>`. Nothing in tags can be modified, or the string will be corrupted. The tags in the translated string must be exactly the same as the ones in the original strings, without any deletions or additions. You are free, however, to change the order of tags, if that is required by your language. |
|
|
|
You need to prepare a CSV file with the translation, place it in the mod folder, and point at it via the Filename property. The base game translation tables are provided in the ModTools folder - e.g. **Game.csv**. The localization table supplied in the mod must have the same format, with translations provided in the third column. |
|
|
|
!!! |
|
The first column, containing the IDs, must be preserved intact. |
|
|
|
!!! |
|
The CSV file must be saved with UTF-8 encoding. |
|
|
|
The localization tables will be loaded in order: first the ones from the base game, then the ones from mods. You can use this load order to override translations from the base game. |
|
|
|
When adding translations for a new language that is not supported by the game, set the language to English when uploading the table and then set the in-game language to English from the main menu to see your new translations. |
|
|
|
The game ships with fonts covering Western, Cyrillic, Korean, Japanese, Simplified Chinese characters. To add new fonts for other languages and scripts, use the [Font mod item](ModItemFont.md.html). |
|
|
|
To use Simplified Chinese, you need to add translations to the lines in the translation table describing the "font styles" used in the game; they look like this: |
|
|
|
~~~~ |
|
1000674,"SchemeBk, 13, aa", |
|
984,"SchemeBk, 15, aa", |
|
986,"SchemeBk, 16, aa", |
|
8572,"LibelSuitRg, 30, aa", |
|
~~~~ |
|
|
|
The string after the first comma is the font style; it consists of a font name (SchemeBk or LibelSuitRg in the examples above), a font size, and an instruction for the font to be antialiased ('aa'). |
|
For Latin and Cyrillic-based languages, there's no need to change the font styles. For CJK languages, use the following font names: |
|
|
|
Simplified Chinese |
|
: Noto Sans CJK SC Regular |
|
Traditional Chinese |
|
: Noto Sans CJK TC Regular |
|
Japanese |
|
: Noto Sans CJK JP Regular |
|
Korean |
|
: Noto Sans CJK KR Regular |
|
|
|
For example, Simplified Chinese "translation" of the font styles should look like this: |
|
|
|
~~~~ |
|
1000674,"SchemeBk, 13, aa","Noto Sans CJK SC Regular, 13, aa" |
|
984,"SchemeBk, 15, aa","Noto Sans CJK SC Regular, 15, aa" |
|
986,"SchemeBk, 16, aa","Noto Sans CJK SC Regular, 16, aa" |
|
8572,"LibelSuitRg, 30, aa","Noto Sans CJK SC Regular, 30, aa" |
|
~~~~ |
|
|
|
You can slightly adjust the font sizes to compensate, or leave them as they are. |
|
|
|
Properties |
|
---------- |
|
|
|
Filename |
|
: Use this to point at the CSV files prepared and copied in the mod folder. |
|
|
|
Language |
|
: The localization table will be loaded only when the game is running in this language. To provide translations for a new language not yet supported by the game, set this to English and run the game in English. |
|
|
|
(insert footer.md.html here) |
|
<link rel="stylesheet" type="text/css" href="Style.css" /> |
|
<style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script> |