Introduce way to dynamically map the languages, helps reduce the typing and also should "just work" if there's any new languages added

This commit is contained in:
blitzmann
2020-06-25 00:09:36 -04:00
parent a2f65e9d46
commit 8be4b0dd91
3 changed files with 13 additions and 7 deletions

View File

@@ -19,7 +19,12 @@ lang = ""
# Maps supported langauges to their suffix in the database
translation_mapping = {
"en_US": "",
"zh_CN": "_zh"
"fr": "_fr",
"it": "_it",
"ja": "_ja",
"ko": "_ko",
"ru": "_ru",
"zh_CN": "_zh",
}
def set_lang(i18n_lang):