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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user