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:
messages.properties (default)
messages_us_EN.properties (American English)
and so on…

That holds keys like
hi.label=Hello!

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…
https://gist.github.com/Naxmeify/8519ae9dde7857a26585

Hi,

I use this super simple class for all my projects:
I18n.cs

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.