- Home /
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.
Answer by Bunny83 · Jul 30, 2012 at 03:19 PM
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.
Answer by $$anonymous$$ · Mar 14, 2015 at 09:56 AM
Had the same issue.
Here is my solution..simple... https://gist.github.com/Naxmeify/8519ae9dde7857a26585
Your answer
Follow this Question
Related Questions
Function to translate text in unity 0 Answers
Unity2019.3 and I18N.dll 1 Answer
Some foreign characters disappear on Android, what should I do? 0 Answers
What is best practice for translation handling? 0 Answers
Arabic Language 6 Answers