Browse Source

kivy: locale: set default language to English

This reverts 7cb11ceda4 (set default language to OS lang).
Some languages (e.g. CJK, Arabic) do not work at all with kivy due to font issues,
so we should never use those as default. It is easiest to just default to English for now.

related https://github.com/spesmilo/electrum/issues/2032
related https://github.com/spesmilo/electrum/issues/4618
related https://github.com/spesmilo/electrum/issues/7494
patch-4
SomberNight 3 years ago
parent
commit
25fee6a6be
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 12
      electrum/gui/kivy/util.py

12
electrum/gui/kivy/util.py

@ -26,7 +26,11 @@ def address_colors(wallet, addr):
def get_default_language() -> str:
if platform != 'android':
return 'en_UK'
from jnius import autoclass
Locale = autoclass("java.util.Locale")
lang = str(Locale.getDefault().toString())
return lang if lang else 'en_UK'
# FIXME: CJK/Arabic/etc languages do not work at all with kivy due to font issues,
# so it is easiest to just default to English... (see #2032)
return 'en_UK'
# # try getting the language of the Android OS
# from jnius import autoclass
# Locale = autoclass("java.util.Locale")
# lang = str(Locale.getDefault().toString())
# return lang if lang else 'en_UK'

Loading…
Cancel
Save