There are two types of files :
- The language list
- The languages files
{
"version":0.2,
"fr":{ //language identifier
"path":"fr.lang", //path of the file that contains French translations
"name":"Français" //Friendly name of the language
},
"en":{
"path":"en.lang",
"name":"English"
}
}Here the file is en.lang
{
"hello" : "Hello, world!",
"stupid_string" : "This is a stupid string", //"identifier" : "value"
"try" : "try try try",
"thanks" : "Thank for using."
}You can also make nested identifiers to make it more clean
{
"hello" : "Hello, world!",
"menu" : {
"newgame" : "New Game",
"continue" : "Continue"
}
}You have to set manually for each field the lang you want to target and the identifier
Text > Set text to ProjectTranslation.GetString(currentLang, "hello")
currentLang is my current language, say fr or en "hello" is the identifier
- Text
- Button
- Spritefont/Spritefont+
- Create a new text using the default text plugin
- Create a new instance variable called lang and assign an identifier to its value

- Call the Action Translate all default text plugins to and pass it the language
- All the text that have a lang instance variables are translated to the right text
No more pain :)
Note : To access nested identifiers use dot notation :
menu.continue will output Continue
Note2 : To access global variables use @fullVariableName