How can I internationalize(I18n) a unity 3D project?

What’s the best way to I18n a project? I mean GUI, dialogs, menu, etc.

I intend to create several I18n files like: (default) (American English)
and so on…

That holds keys like

So I need to read those keys, search in the i18N files and print the value of those keys.

It’s better if its cached since the I18N files are static.

Had the same issue.

Here is my solution…simple…


I use this super simple class for all my projects:

Of course you need to cache the strings. The usual approach is to have a class that holds an array or dictionary which is initialized from a language file. Some uses “phraseIDs” which are just the index into the array or the dictionary. That way it’s very easy to load the data.

Another approach is to use english as default language and use a dictionary which translates each sentence into the desired language.

There’s also the SystemLanguage enum which can be used to specify the lanugage.