Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCurrentLanguage iOS app system setting change bug #8

Open
chiew256 opened this issue Feb 21, 2024 · 0 comments
Open

getCurrentLanguage iOS app system setting change bug #8

chiew256 opened this issue Feb 21, 2024 · 0 comments

Comments

@chiew256
Copy link

Hi, I encounter a bug when trying to change the language from the iOS system settings for the app.
Scenario 1 is where the bug reproducible steps.
Scenario 2 is the hypothesis I made based on the bug.

Scenario 1 (BUG)

User Preferred Languages Order:

  1. <App_NotSupportedLanguage>
  2. <AppSupportedLanguage_1>
  3. <AppSupportedLanguage_2>
  4. <AppSupportedLanguage_3>

When you select AppSupportedLanguage_1, it won’t push to the first item on AppleLanguages.
From AppleLanguages log: Return me the user's original language preference order.

Any App_NotSupportedLanguage after the AppSupportedLanguage_1 will pushed to the first item when selecting on app system setting.

Scenario 2 (No bug)

User Preferred Languages Order:

  1. <AppSupportedLanguage_1>
  2. <App_NotSupportedLanguage>
  3. <AppSupportedLanguage_2>
  4. <AppSupportedLanguage_3>

When you select any AppSupportedLanguage, it will push to the first item on AppleLanguages

Hypothesis

Please correct if I'm wrong. I suspect this is original behavior from the iOS which is due to how iOS handles app-specific language settings. When you select a language for your app in the system settings, iOS adds that language to the top of the AppleLanguages array. However, if the first language in your system's preferred languages list is not supported by your app, iOS will not move the second language to the top of the AppleLanguages array, even if your app supports it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant