Update localization.py

This commit is contained in:
joBr99
2022-04-17 09:34:23 +02:00
committed by GitHub
parent 400c57f98e
commit d65e03ad6d

View File

@@ -693,7 +693,8 @@ translations = {
} }
def get_translation(locale, input): def get_translation(locale, input):
en_fallback_res = translations.get("en_US").get(input, input) locale = locale.split("_")[0]
en_fallback_res = translations.get("en").get(input, input)
if locale in translations: if locale in translations:
return translations.get(locale).get(input, en_fallback_res) return translations.get(locale).get(input, en_fallback_res)
else: else: