From 25fee6a6be7e8e4bb8a0a62ef6737f6019d372e4 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 22 Mar 2022 17:20:33 +0100 Subject: [PATCH] kivy: locale: set default language to English This reverts 7cb11ceda4d0191ca3e91be22812d967f46b85ec (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 --- electrum/gui/kivy/util.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/electrum/gui/kivy/util.py b/electrum/gui/kivy/util.py index 7053baad5..b6d80192c 100644 --- a/electrum/gui/kivy/util.py +++ b/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'