Best way to manage text

Hi all,

My app has lots of text and supports multiple languages.
In “the olde days” i.e. C :slight_smile: , I would just have a text file per language then create a table for languages to text files and index link that

#define TEXT_1 0
#define TEXT_2ND_STRING 1

etc.

What’s the best way in Unity and c# to do this?

thanks

A good solution would be to have a 2 dimensional array , or an array of arrays and access it's containings depending on the language. Semi-Pseudo code below , im pretty sure it doesnt work but its just to prove an example.

String language;
String definitionText[][];

void OnGUI(){
if(language=="English"){
GUI.Label(Rect(100,100,100,20),definitionText[0][0]);
GUI.Label(Rect(100,200,100,20),definitionText[0][1]);
}

else if(language=="French"){
GUI.Label(Rect(100,100,100,20),definitionText[1][0]);
GUI.Label(Rect(100,100,200,20),definitionText[1][1]);
}
//etc etc
}