mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-08 22:36:33 +01:00
Fixed localization
This commit is contained in:
@@ -883,6 +883,7 @@ translations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_translation(locale, input):
|
def get_translation(locale, input):
|
||||||
|
locale = locale.split("_")[0]
|
||||||
en_fallback_res = translations.get("en").get(input, input)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user