i am making a sci fi open world futuristic rol rpg game but i want to make it international not only english or spanish
There are two different options; allow the user to select their preferred language or automatically detect it (you would need to get the language the user’s operating system is running on)
Or you could present a selection of buttons that set all strings to their regional language at the start of the game.
if (GUILayout.Button (new GUIContent ("Select English",
"Choose English as your language")))
{
English ();
}
if (GUILayout.Button (new GUIContent ("Francais",
"Choose French as your language")))
{
French ();
}
static void English()
{
string1 = "Random string";
string2 = "Something something dark side";
}
static void French()
{
string1 = "je vois du avanget";
string2 = "le pantelon fancie";
}
The best option would probably be using XML files (similar to android development) You would have a list of XML files:
- English.XML
- French.XML
- Spanish.XML
Then just switch between them when the application loads or give the user an option to select/change their language.