Translations
- This article is about translating the game or a mod. For a guide to translating the wiki, see Help:Translations.
Information about the game's translation system. Translations need to be saved in the encoding of the language used by the game. Files also need to follow the naming conventions and format of the translation types.
Translation types
Commonly used files
These files follow the same naming convention Translate/{language}/{File}_{language}.txt and use the same format.
File | Prefix | function | Notes |
---|---|---|---|
Challenge | Challenge_ | getText | challenges |
ContextMenu | ContextMenu_ | getText | context menus |
DynamicRadio | AEBS_ (optional) | getRadioText | dynamic radio, e.g. weather and helicopter |
EvolvedRecipeName | EvolvedRecipeName_ (optional) | Translator.getItemEvolvedRecipeName | |
Farming | Farming_ | getText | |
GameSound | GameSound_ | getText | sound names |
IG_UI | IGUI_ | getText | in-game UI |
Items | DisplayName, DisplayName_ (optional) | Translator.getDisplayItemName | OUTDATED |
ItemName | ItemName_ (optional) | getItemNameFromFullType | Item display names |
MakeUp | MakeUp | getText | |
Moodles | Moodles_ | getText | |
Moveables | Translator.getMoveableDisplayName | Names of tiles - sprites | |
MultiStageBuild | MultiStageBuild_ | Translator.getMultiStageBuild | automatically appends the prefix when you get the translation |
Recipes | Recipe_ (optional) | getRecipeDisplayName | |
RecordedMedia | RM_ | getText | keys are commonly prefix + GUID |
Sandbox | Sandbox_ | getText | |
Stash | Stash_ | getText | Stash houses, maps with annotations |
SurvivalGuide | SurvivalGuide_ | getText | guides |
Tooltip | Tooltip_ | getText | |
UI | UI_ | getText | Main menu UI |
- Prefixes can be handled differently; they can be optional, removed from key maps or not used at all.
- Use the full type where type is used as key.
- Moveables use *Group Name Custom Name* for names and keys. These characters ` `, `-`, `'`, `.` are converted.
Examples
Example of ContextMenu, file: Translate/EN/ContextMenu_EN.txt
ContextMenu_EN = { ContextMenu_Destroy = "Destroy ", }
Example of text split in multiple lines.
SurvivalGuide_EN = { SurvivalGuide_entrie11moreinfo = " <H1> FORAGING / SEARCH SYSTEM <BR> " .. " ..." .. " For example, trash can be found in trash piles, chipped stones are often found in cracks and potholes on roads. <LINE> <LINE> ", }
- Note: the translation parser skips the first line, then breaks the line into key - text format. Required characters: (=) ("). This means the next format is valid in v.41.78. The parser has other nuances, but they are not neccessary to know to make translations.
line 1: skipped key = "text"
Recipes
Script parser uses `replace("recipe","")` to make original name, sets translated recipe name. Translator populates recipe maps (normal and 'dot' maps) and uses *replace("Recipe_","")*, *replace("_"," ")* for the keys.
Examples A, both translation lines work. script: 'recipe Convert A B {...}' original name: 'Convert A B' translation line: 'Recipe_Convert_A_B = "Convert Item to Weapon"' translation line: 'Convert A B = "Convert Item to Weapon"' translation key: 'Convert A B' Example B, no match for translation, do not use `_` in recipe scripts script: 'recipe Convert_A_B' original name: 'Convert_A_B' translation key: 'Convert A B'
News
The news file uses separate format.
Map information
Translations for map titles and descriptions.
source: media/maps/{Map}/map.info title: Translate/{Language}/{Map}/title.txt description: Translate/{Language}/{Map}/description.txt
Example Riverside description, file: Translate\EN\Riverside, KY\description.txt
Riverside <LINE> <LINE> A colorful town tightly hugging the banks of the mighty Ohio: exploring Riverside is a rich and diverse experience! ...
Translation files need to follow the folder structure of the map. e.g. Translate/challengemaps/Kingsmouth/title.txt
Radio data
Radio Data is read from media/radio/. Radio sources are xml files, translations are txt files. The recommended way to translate these can be found on the translation GitHub, however you can also edit them just like any other txt file.
Languages
The game uses languages added to the media/lua/shared/Translate folder, information about the language is stored in the the language.txt file of each language directory.
Code | Language | Encoding | Category |
---|---|---|---|
AR | Espanol (AR) - Argentina Spanish | Cp1252 | Western |
CA | Catalan | ISO-8859-15 | Western |
CH | Traditional Chinese | UTF-8 | |
CN | Simplified Chinese | UTF-8 | |
CS | Czech | Cp1250 | Central European |
DA | Danish | Cp1252 | Western |
DE | Deutsch - German | Cp1252 | Western |
EN | English | UTF-8 | |
ES | Espanol (ES) - Spanish | Cp1252 | Western |
FI | Finnish | Cp1252 | Western |
FR | Francais - French | Cp1252 | Western |
HU | Hungarian | Cp1250 | Central European |
ID | Indonesia | UTF-8 | |
IT | Italiano | Cp1252 | Western |
JP | Japanese | UTF-8 | |
KO | Korean | UTF-16 | |
NL | Nederlands - Dutch | Cp1252 | Western |
NO | Norsk - Norwegian | Cp1252 | Western |
PH | Tagalog - Filipino | UTF-8 | |
PL | Polish | Cp1250 | Central European |
PT | Portuguese | Cp1252 | Western |
PTBR | Brazilian Portuguese | Cp1252 | Western |
RO | Romanian | UTF-8 | |
RU | Russian | Cp1251 | Cyrilic |
TH | Thai | UTF-8 | |
TR | Turkish | Cp1254 | Turkish |
UA | Ukrainian | Cp1251 | Cyrilic |
Adding new languages
- Create a new folder with the id of the language
- Add the language.txt file
- Add fonts if neccessary
- Add translations
The language.txt file must have VERSION, text and charset values, the rest are optional. It uses the scriptblock format.
key | example | notes |
---|---|---|
VERSION | 1 | |
text | English | the name of the language |
charset | UTF-8 | encoding used by the language |
azerty | true | |
base | PT | not used, might have limited support |