On unity editor Ok, But On device not working !!
6 years 9 months ago #2807
by fusefor
On unity editor Ok, But On device not working !! was created by fusefor
On unity, I2 is working, but on device only english is showing.
I added two languages (English, Korean).
On unity, both Application.systemLanguage and I2.Loc.LocalizationManager.CurrentLanguage were Korean. working good!
But, On device(My device's language is Korean)
Application.systemLanguage was 'Korean'. But, I2.Loc.LocalizationManager.CurrentLanguage was 'English'.
So, There are no translation happen! Everything is english...
What is problem???
Solve it please....
I added two languages (English, Korean).
On unity, both Application.systemLanguage and I2.Loc.LocalizationManager.CurrentLanguage were Korean. working good!
But, On device(My device's language is Korean)
Application.systemLanguage was 'Korean'. But, I2.Loc.LocalizationManager.CurrentLanguage was 'English'.
So, There are no translation happen! Everything is english...
What is problem???
Solve it please....
Please Log in or Create an account to join the conversation.
6 years 9 months ago #2809
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic On unity editor Ok, But On device not working !!
Hi,
The device language is detected and used as far as you haven't selected any other language.
The first time the game runs, it detects the language, and if you have that language or any of its variants in your I2Languages.prefab, then that will be used (e.g. device is Korean so your game will show Korean).
However, if you manually change the language (e.g. by clicking a SetLanguage button), then that will be remembered, and from that point on, your language will be set to that, even if your device has another language.
My guess is that you was testing your app and switched to English, and so, now it always remembers that option.
Here you can find more details about how this works exactly.
inter-illusion.com/assets/I2Localization...InitialLanguage.html
A way to revert to autodetection, is to uninstall the game, and then reinstall it again. That will clear all the cache and start auto-detecting.
Hope that helps,
Frank
The device language is detected and used as far as you haven't selected any other language.
The first time the game runs, it detects the language, and if you have that language or any of its variants in your I2Languages.prefab, then that will be used (e.g. device is Korean so your game will show Korean).
However, if you manually change the language (e.g. by clicking a SetLanguage button), then that will be remembered, and from that point on, your language will be set to that, even if your device has another language.
My guess is that you was testing your app and switched to English, and so, now it always remembers that option.
Here you can find more details about how this works exactly.
inter-illusion.com/assets/I2Localization...InitialLanguage.html
A way to revert to autodetection, is to uninstall the game, and then reinstall it again. That will clear all the cache and start auto-detecting.
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.
6 years 9 months ago #2812
by fusefor
Replied by fusefor on topic On unity editor Ok, But On device not working !!
I tested all.. uninstall and reinstall... but same problem..
I can't understand this problem...
Application.systemLanguage is 'Korean'. But, I2.Loc.LocalizationManager.CurrentLanguage is 'English'.
How can these are different?
Here are captures of my setting...
I can't understand this problem...
Application.systemLanguage is 'Korean'. But, I2.Loc.LocalizationManager.CurrentLanguage is 'English'.
How can these are different?
Here are captures of my setting...
Please Log in or Create an account to join the conversation.
6 years 9 months ago #2813
by fusefor
Replied by fusefor on topic On unity editor Ok, But On device not working !!
In the starting part of my project I inserted this... (only one time do in the first app running)
void InitLanguage()
{
CheckLanguage("Korean");
}
void CheckLanguage(string lang)
{
if (Application.systemLanguage.ToString() == lang)
{
if (LocalizationManager.HasLanguage(lang))
{
LocalizationManager.CurrentLanguage = lang;
}
}
}
Now there is no problem!!!! both Unity editor and device working good!!!!
Don't you think there is some bug in your asset?
void InitLanguage()
{
CheckLanguage("Korean");
}
void CheckLanguage(string lang)
{
if (Application.systemLanguage.ToString() == lang)
{
if (LocalizationManager.HasLanguage(lang))
{
LocalizationManager.CurrentLanguage = lang;
}
}
}
Now there is no problem!!!! both Unity editor and device working good!!!!
Don't you think there is some bug in your asset?
Please Log in or Create an account to join the conversation.
6 years 9 months ago #2814
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic On unity editor Ok, But On device not working !!
Hi,
I was able to reproduce this issue.
There was a problem with the latest change to how the Languages are detected on Android.
Unity's Application.systemLanguage doesn't return the region (e.g. English (Canada) )
So, on the latest release there is some code to get the language name directly from the device. However, there was an issue that made the not match any of the ones in the LanguageSource.
I just made a proper fix for that in 2.8.4a4 (which can be downloaded from the beta folder).
It requires changes in a couple files, so I advice you to get that beta for this fix.
Said that, this code can also be disabled by falling back to the Application.systemLanguage. You wont get the device region, but it will work fine for now if you can't update at this moment.
just change the GetCurrentDeviceLanguage function in
Assets\I2\Localization\Scripts\Manager\LocalizationManager_SystemLanguage.cs line 14 by this one:
Hope that helps,
Frank
I was able to reproduce this issue.
There was a problem with the latest change to how the Languages are detected on Android.
Unity's Application.systemLanguage doesn't return the region (e.g. English (Canada) )
So, on the latest release there is some code to get the language name directly from the device. However, there was an issue that made the not match any of the ones in the LanguageSource.
I just made a proper fix for that in 2.8.4a4 (which can be downloaded from the beta folder).
It requires changes in a couple files, so I advice you to get that beta for this fix.
Said that, this code can also be disabled by falling back to the Application.systemLanguage. You wont get the device region, but it will work fine for now if you can't update at this moment.
just change the GetCurrentDeviceLanguage function in
Assets\I2\Localization\Scripts\Manager\LocalizationManager_SystemLanguage.cs line 14 by this one:
public static string GetCurrentDeviceLanguage()
{
return Application.systemLanguage.ToString();
}
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.
Time to create page: 0.147 seconds