Translating
AeroLiners Set achieves multilingual support through the .lng files in the lang/ directory. All interface text — GRF name, parameter descriptions, model names, livery names — comes from the STR_* strings in these files.
There are currently 15 built-in languages: catalan, chinese_simplified, chinese_traditional, croatian, czech, dutch, english, finnish, german, indonesian, italian, korean, polish, russian, spanish.
Translation file format
Each .lng file starts with a language ID, followed by string_id : localized_text key-value pairs:
##grflangid 0x01
STR_GRF_NAME :AeroLiners
STR_GRF_DESCRIPTION :{ORANGE}AeroLiners Set{}...
STR_PARAM_BCOSTS_NAME :Base cost factor
STR_AIRV_AIRBUS_A300_600R :Airbus A300-600R
...Notes
- Do not use Tab indentation in
.lngfiles — use spaces only. - Placeholders (such as
{VERSION},{ORANGE},{SILVER}) must be preserved verbatim.
Adding a new language
- Copy
lang/english.lngand name it{lang_id}_{lang_name}.lng(refer to the upstream legacy flowsprites/nfo/00strings). - Look up your language ID at http://wiki.ttdpatch.net/tiki-index.php?page=Action4#language_id.
- Change every
englishin the file to your language name, and fill the corresponding language constant after#define LANG .(valid values are indocs/readme.txtsection 6, e.g.CHINESE_SIMPLIFIED,KOREAN). - Translate everything inside
"..."; prefix untranslated lines withUto save NewGRF size and memory.
Updating an existing language
Simply edit the corresponding lang/*.lng, keeping the string IDs unchanged and only updating the right-hand text. After adding models / liveries, don't forget to add translations for the new STR_AIRV_* / STR_VLIV_* strings.
Back: Liveries & Graphics → | Next: Contributing →