How to add language
This tutorial help you to understand how to add new languages
Files & folders needed:
assets/texts/lang_*your_code*.json
assets/options.json
Open asstes/options.json file and find there languages property.
"languages": {
"ch": {
"name": "lang.ch"
},
"en": {
"name": "lang.en"
},
"ru": {
"name": "lang.ru"
},
"ua": {
"name": "lang.ua"
}
}
Add there new object with your code and name:
"pl": {
"name": "lang.pl"
}
It will be looks like this:
"languages": {
"ch": {
"name": "lang.ch"
},
"en": {
"name": "lang.en"
},
"ru": {
"name": "lang.ru"
},
"ua": {
"name": "lang.ua"
},
"pl": {
"name": "lang.pl"
}
}
Save options file and create new file in assets/text/lang_.json. Add there language name translation from options file.
{
"lang.pl": "Polska"
}
Run game and check options. Now you can translate game.
Additional description about language strings formatting bbcodes here:
lang_*.jsonLast updated