-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Regional languages support #336
Conversation
setting locale before loading main settings view resources
explicitly defined system language selection on default language choice, added code for better compatibility with APIs < 24
little refactor of locale code, CustomActivity.setLocale now parses language for itself, even for system provided language code
Can one of the core team members give me the the permission to test this? |
Ok to test |
@sk-juroot Your local branch also contains the commits already merged as part of #332. Can you rebase / recreate this PR as on top fixes based on current |
Sure, will open another PR from different branch to merge this change |
if (loc[0].equals("pt")) { | ||
// nasty hotfix for Portuguese language selected without regional code | ||
locale = new Locale(loc[0], loc[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do it the way around - rename the language pt_PT
to pt
.
I created Issue #342 for it.
After that these lines are not more necessary.
Description
Reworked
CustomActivity.setLocale()
to internally handle regional and non-regional language codes on various system versions.Related issues
Additional context
This code contains hardcoded check for Portuguese language (as the only regional-coded language in this project right now), since various Android devices may report this language as non-regional, causing falling back to English even when proper language asset is present.