Skip to content

On android use native getLocale() for default language - #867

Merged
SergeBakharev merged 1 commit into
Carvera-Community:release/2.2.xfrom
SergeBakharev:serge-860
Oct 14, 2026
Merged

SergeBakharev merged 1 commit into
Carvera-Community:release/2.2.xfrom
SergeBakharev:serge-860

Conversation

@SergeBakharev

Copy link
Copy Markdown
Contributor

Summary

Resolves #860 by using the Android specific method using

from jnius import autoclass
PythonActivity = autoclass("org.kivy.android.PythonActivity")
locales = PythonActivity.mActivity.getResources().getConfiguration().getLocales()

Also while I'm at it replace the deprecated locale.getdefaultlocale() with locale.getlocale()

AI Assistance was used, grok 4.7 and opus 4.6

Contributor checklist

  • I am a human submitting this pull request.
  • I have read and understand every changed line, and I take responsibility
    for the complete change.
  • Pre-commit checks (poetry run pre-commit run --all-files) passes with no errors.
  • The changes have been tested with real hardware.
  • I have read and understood the contributions guidelines

@SergeBakharev
SergeBakharev merged commit 77d15c7 into Carvera-Community:release/2.2.x Oct 14, 2026
1 check passed
This was referenced Oct 14, 2026
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

Successfully merging this pull request may close these issues.

1 participant