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

Per app language not working when there are multiple system languages [possible upstream bug] #2839

Open
daniele-athome opened this issue Mar 2, 2025 · 7 comments
Labels
bug Something isn't working help wanted Open to community contribution at any time p4 Priority 4 translations

Comments

@daniele-athome
Copy link

I have a Pixel 8 running Android 15 with the following system languages configured in this order (on Android 15 you can configure more than one and give them priorities):

  • English (UK)
  • Italian

Since the latest update a couple of weeks ago, I noticed the sunset alarm notification was in Italian. Almost all the app is in English, however, beside that notification, a few strings are in Italian:

The only way to make it right is to remove Italian from the system languages - but I'd rather not do that because that setting also controls which languages my input methods make available.

@kylecorry31
Copy link
Owner

Hi, I believe this is intended behavior of Android itself. This cause is that the string(s) you are seeing in Italian are not present in the UK English translations.

You can get around this by:

  1. Contributing the missing translations for UK English: Translations #213. Requires a new release (later this month)
  2. Setting the per app language on Android 15 (I believe under app info in system settings)
  3. Adding US English as a preference after UK English but before Italian
  4. This issue (open to community contribution): [Settings] Add 'language' selection in settings / general #403

@kylecorry31
Copy link
Owner

I'm going to close this in factor of #403 / #213

@kylecorry31 kylecorry31 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2025
@daniele-athome
Copy link
Author

Sorry, I was doing some tests and I had to wait for the sunset notification alarm which is triggered once a day eheh (too lazy to do tests from Android Studio :-)

I thought Android would fall back to the "nearest" available language in the app (en-GB -> en), or the app default language at least (which is English if I'm not mistaken). It's been some time since I used to develop on Android so something probably has changed over the years.

I'll have more news about all my tests tonight.

@daniele-athome
Copy link
Author

Ok so:

  • Solution 3 works
  • Removing Italian from system languages works
  • Setting English (US) as app-specific language in system settings didn't work (this should probably be a bug, shouldn't it? But whose bug, Android or Trail Sense?): both sunset notification and the screens reported in the original report were affected

According to Android documentation - if I'm getting this right - the system will not even consider en-US when there is Italian in the list after en-GB. I'm guessing the "right" fix here would be to add en-US before Italian, as you proposed... however the app-specific language setting should have worked IMHO.

@kylecorry31 kylecorry31 reopened this Mar 4, 2025
@kylecorry31 kylecorry31 added the bug Something isn't working label Mar 4, 2025
@kylecorry31
Copy link
Owner

Ok so:

  • Solution 3 works
  • Removing Italian from system languages works
  • Setting English (US) as app-specific language in system settings didn't work (this should probably be a bug, shouldn't it? But whose bug, Android or Trail Sense?): both sunset notification and the screens reported in the original report were affected

According to Android documentation - if I'm getting this right - the system will not even consider en-US when there is Italian in the list after en-GB. I'm guessing the "right" fix here would be to add en-US before Italian, as you proposed... however the app-specific language setting should have worked IMHO.

Thank you for the detailed breakdown, it does sound like this is a bug. I believe I have the app-specific language set up as specified by the documentation.

I'm not sure if I will hae the time to look into this, would you be able to create a test project so we can rule out Trail Sense?

(https://developer.android.com/guide/topics/resources/app-languages#auto-localeconfig with en-UK [missing a string], en-US, and it)

If it is reproducible in a sample app, we can submit that in the Android issue tracker.

@kylecorry31 kylecorry31 added the help wanted Open to community contribution at any time label Mar 4, 2025
@kylecorry31 kylecorry31 changed the title Some parts of the app are in another language, some are in english Per app language not working when there are multiple system languages Mar 4, 2025
@kylecorry31 kylecorry31 changed the title Per app language not working when there are multiple system languages Per app language not working when there are multiple system languages [possible upstream bug] Mar 4, 2025
@daniele-athome
Copy link
Author

Another note about this: I had to also set app-specific language to en-US to make it work. Adding en-US after en-GB in system settings wasn't enough.

I'm really confused... I'll do the test app and let you know.

@kylecorry31
Copy link
Owner

kylecorry31 commented Mar 5, 2025

Thank you, much appreciated!

I wonder if Android requires both the language available at the system level and app level for that to work (that would be odd, but I could see that being the case)

It does look like Google recommends setting the language as a system language and app language as a troubleshooting step: https://support.google.com/android/answer/12395118?hl=en#zippy=%2Cif-you-change-the-app-setting-but-the-app-language-doesnt-change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to community contribution at any time p4 Priority 4 translations
Projects
None yet
Development

No branches or pull requests

2 participants