Android language bug #157

Closed
opened 2025-11-07 08:29:16 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @zhtw2013 on GitHub (Dec 27, 2017).

Simplified Chinese was mistakenly displayed in the traditional Chinese system(Android)
qaq

Originally created by @zhtw2013 on GitHub (Dec 27, 2017). Simplified Chinese was mistakenly displayed in the traditional Chinese system(Android) ![qaq](https://user-images.githubusercontent.com/9501406/34371364-826303ea-eb07-11e7-92b3-bf8f91376ace.png)
Author
Owner

@kspearrin commented on GitHub (Dec 27, 2017):

I can't seem to reproduce it. What language setting are you using on your device? This is the current logic:

            if(androidLanguage.StartsWith("zh"))
            {
                if(androidLanguage.Contains("Hant"))
                {
                    netLanguage = "zh-Hant";
                }
                else
                {
                    netLanguage = "zh-Hans";
                }
            }

Basically we support zh-Hant (traditional). If that isn't the setting it always falls back to zh-Hans (simplified).

@kspearrin commented on GitHub (Dec 27, 2017): I can't seem to reproduce it. What language setting are you using on your device? This is the current logic: ``` if(androidLanguage.StartsWith("zh")) { if(androidLanguage.Contains("Hant")) { netLanguage = "zh-Hant"; } else { netLanguage = "zh-Hans"; } } ``` Basically we support `zh-Hant` (traditional). If that isn't the setting it always falls back to `zh-Hans` (simplified).
Author
Owner

@kspearrin commented on GitHub (Dec 27, 2017):

image

These are the only two Chinese options I have on my test devices.

@kspearrin commented on GitHub (Dec 27, 2017): ![image](https://user-images.githubusercontent.com/1190944/34393045-c49907da-eb1d-11e7-8af5-3c20497404a6.png) These are the only two Chinese options I have on my test devices.
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

My devices system language- 繁體中文(traditional chinese)

@zhtw2013 commented on GitHub (Dec 28, 2017): My devices system language- 繁體中文(traditional chinese)
Author
Owner

@kspearrin commented on GitHub (Dec 28, 2017):

I tried all three of these on my device and they all returned the resource file for zh-Hant. Is that not correct?

image

@kspearrin commented on GitHub (Dec 28, 2017): I tried all three of these on my device and they all returned the resource file for `zh-Hant`. Is that not correct? ![image](https://user-images.githubusercontent.com/1190944/34400786-bf11cbd6-eb62-11e7-9bff-6acb7240175d.png)
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

That is correct.
but...devices displayed Simplified chinese...

Test devices
Asus Zenfone3 繁體中文(台灣) (traditional chinese taiwan) Android 7.0
Xiaomi Redmi Note 4X-繁體中文(traditional chinese) Android 6.0.1

My friend devices
LG G5 繁體中文(台灣) (traditional chinese taiwan) Android 7.0

In google play comment
002

I am not the first.....

@zhtw2013 commented on GitHub (Dec 28, 2017): That is correct. but...devices displayed Simplified chinese... Test devices Asus Zenfone3 繁體中文(台灣) (traditional chinese taiwan) Android 7.0 Xiaomi Redmi Note 4X-繁體中文(traditional chinese) Android 6.0.1 My friend devices LG G5 繁體中文(台灣) (traditional chinese taiwan) Android 7.0 In google play comment ![002](https://user-images.githubusercontent.com/9501406/34402335-cae0c0ce-ebdb-11e7-97ca-a90ba0da0f8c.png) I am not the first.....
Author
Owner

@kspearrin commented on GitHub (Dec 28, 2017):

This is weird. Are any of those devices rooted or can you connect them to a PC to view logcat? There should be log messages that show debug output on what language is loaded by the app. Look for:

image

@kspearrin commented on GitHub (Dec 28, 2017): This is weird. Are any of those devices rooted or can you connect them to a PC to view logcat? There should be log messages that show debug output on what language is loaded by the app. Look for: ![image](https://user-images.githubusercontent.com/1190944/34412904-02e5a6ac-ebae-11e7-97ab-56510861afe7.png)
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

this?
screenshot_2017-12-28-23-45-06-157_com nolanlawson logcat

@zhtw2013 commented on GitHub (Dec 28, 2017): this? ![screenshot_2017-12-28-23-45-06-157_com nolanlawson logcat](https://user-images.githubusercontent.com/9501406/34415432-a949de34-ec29-11e7-8825-fb47b5504c5b.png)
Author
Owner

@kspearrin commented on GitHub (Dec 28, 2017):

Yes, but I need to see the one that says "Android Language:____"

@kspearrin commented on GitHub (Dec 28, 2017): Yes, but I need to see the one that says "Android Language:____"
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

I found my zenfonz3 have two chinese...

Chinese traditional(taiwan) and Chinese(taiwan)

In Chinese traditional(taiwan) Display zh-Hant
But
In Chinese(taiwan) Display zh-Hans.....

Maybe the language code are different...

@zhtw2013 commented on GitHub (Dec 28, 2017): I found my zenfonz3 have two chinese... Chinese traditional(taiwan) and Chinese(taiwan) In Chinese traditional(taiwan) Display zh-Hant But In Chinese(taiwan) Display zh-Hans..... Maybe the language code are different...
Author
Owner

@kspearrin commented on GitHub (Dec 28, 2017):

Can you please post the logcat output that shows Android Language:____?

@kspearrin commented on GitHub (Dec 28, 2017): Can you please post the logcat output that shows `Android Language:____`?
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

I am trying...

@zhtw2013 commented on GitHub (Dec 28, 2017): I am trying...
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

screenshot_2017-12-29-01-32-48-576_rs pedjaapps alogcatroot app

Language_zh-TW

@zhtw2013 commented on GitHub (Dec 28, 2017): ![screenshot_2017-12-29-01-32-48-576_rs pedjaapps alogcatroot app](https://user-images.githubusercontent.com/9501406/34418326-6ddb35f0-ec38-11e7-89d6-ec68c31dd831.png) Language_zh-TW
Author
Owner

@kspearrin commented on GitHub (Dec 28, 2017):

OK, great. Thanks. It seems android is handling that differently on different devices. I will add a fix for next version.

@kspearrin commented on GitHub (Dec 28, 2017): OK, great. Thanks. It seems android is handling that differently on different devices. I will add a fix for next version.
Author
Owner

@zhtw2013 commented on GitHub (Dec 28, 2017):

Thanks for your help.

@zhtw2013 commented on GitHub (Dec 28, 2017): Thanks for your help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#157