[Bug] App name having TWO Chinese languages

More
6 years 10 months ago - 6 years 8 months ago #2267 by SweatyChair
Currently in post-process, I2 get the language codes with:
LocalizationManager.GetAllLanguagesCode(allowRegions=false)

This breaks the app name localization for languages such as Chinese Traditional[zh-TW] + Chinese Simplfied[zh-CN], merging them into Chinese[zh]. iOS didn't do a fallback and so didn't localize the app name but keep it as English (default Unity set app name).

Simple solution is just make allowRegions=true, I am not sure if this will affect others, but for me Chinese is the only language having 2 regions. e.g. I use Spanish[es] ONLY for Spanish, not other regions. I assume all developers are same as me?

Always remember you're unique, just like everyone else.
Last edit: 6 years 8 months ago by SweatyChair.

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

More
6 years 10 months ago - 6 years 10 months ago #2273 by SweatyChair
I can confirm that using
LocalizationManager.GetAllLanguagesCode(true)

Fails Android build, because Android doesn't like value-zh-CN, following the this and this , I need hard code this for now:
string c = code;
if (c == "zh-CN")
    c = "zh-rCN";
else if (c == "zh-TW")
    c = "zh";

string dir = pathToBuiltProject + "/res/values-" + c;

After this build success, but haven't tried the app name localization is working yet...

Always remember you're unique, just like everyone else.
Last edit: 6 years 10 months ago by SweatyChair.

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

More
6 years 10 months ago #2274 by Frank
Hi,
Thanks for letting me know, I will test this tomorrow and correct the code for the cases where IOS or Android could fail.

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
6 years 8 months ago - 6 years 8 months ago #2392 by SweatyChair
Updated to 2.7.0 and TWO Chinese problem in Android still not take care of, and I need to manually change the script again....

There should be 3 values folders for Chinese:
zh-rCN (Simplified Chinese)
zh-rTW (Traditional Chinese)
zh (Traditional Chinese)

More info can be found in this post

And these are my languages:

Always remember you're unique, just like everyone else.
Last edit: 6 years 8 months ago by SweatyChair.

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

More
6 years 8 months ago #2393 by Frank
I added a fix for this, its included in the latest beta (2.8.0 a3), but haven't released it to the AssetStore yet.
The new version includes lots of new stuff that I'm still testing, hope to be able of releasing it in a week or so.

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
6 years 5 months ago - 6 years 5 months ago #2525 by SweatyChair
I think you fixed Android but forgot iOS....

in PostProcessBuild_IOS.cs line 21, it should be:
var langCodes = LocalizationManager.GetAllLanguagesCode(true);

Currently only ONE zh folder is generated (which is recognized as Simp.Chinese, so Trad.Chinese won't be translated and fell back to English):


After change TWO folders are here and Trad.Chinese is correctly shown:

Always remember you're unique, just like everyone else.
Last edit: 6 years 5 months ago by SweatyChair.

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

Time to create page: 0.280 seconds
Template by JoomlaShine