Change language based on culture info.

More
8 years 10 months ago #1274 by srowlands
Hi Frank,

I am currently trying to change language depending on the detected language on a users system, but also to include their culture information for example switching between English US, English UK etc.

My computer is set to English UK but the returned terms are always in English US and on closer inspection, it seems that the culture info is returned as English US. Have you run into this problem before? It seems Unity is always detecting my culture info as English US and therefore I can't switch between different variants of a language.

Thanks,
Sam

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #1275 by srowlands
I believe it is because of the following -

In LocalizationManager.cs - SelectStartupLanguage() you use -

string SysLanguage = Application.systemLanguage

This will return "English" if English, but is not region specific. Then you use this value to obtain the language code from the entered languages on the language source. However, it will just return the first code from the first instance of English, which could be English, English (United States) etc.

I may be missing something, not sure how you obtain the region specific code from a users system language.

Thanks,
Sam

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #1276 by Frank
Hi,
As you say, the plugin uses Application.systemLanguage which doesn't detect the language region. When the game starts, it detects the language but fallsback to the first available region, if the user wants to switch to a different region, the currently have to do so by using an in-game language selection.

Because unity doesn't detect the language region, I was working on adding a platform native code to fully detect it. I finished the android version and was going to add the IOS version as well, but there have been just a couple users requesting this feature and even those haven't been requesting it as a priority. I think that feature its really needed, but if users were more concerned about other features, then I gave it a low priority and continued working on other things.

The other problem with that feature, is that the plugin currently needs to be outside of the plugins folder (because it needs to access third party plugins like TextMeshPro, NGUI), however, the native code used to detect the device language and region has to be in the plugins folder. So, after the setup is completed, you will have part of the plugin outside the plugins folder and part inside. I'm a bit concerned that for most users having I2L all over the project hierarchy and not just packed inside the i2 Localization folder, could be an issue (There are very organization freaks out there! I'm one of them!!)

I will like to schedule time to finish the IOS language detection and release this feature. At the moment, I have 4 high-priority features in my todo list and a then a dozen of low-priority features including this language detection. I will move the language detection to the top of the low-priority features and prioritize it more if more users request it!

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #1277 by yuewah
native region feature +1

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #1278 by yuewah
In LocalizationManager, there are CurrentLanguage and CurrentLanguage, will you add CurrentRegion and CurrentRegionCode ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.200 seconds
Template by JoomlaShine