This commit is contained in:
SuperSonic 2019-08-25 09:22:44 +08:00
parent b0504f844c
commit 8b6b1675ea

View file

@ -11,9 +11,12 @@ class Yuuki_LangSetting:
} }
def gettext(self, text, lang=None): def gettext(self, text, lang=None):
if lang: try:
return self.support[lang].i18nText[text] if lang:
return self.support[self.default].i18nText[text] return self.support[lang].i18nText[text]
return self.support[self.default].i18nText[text]
except KeyError:
return text + "\n\n{Language Package is not Work, please inform the Admin of the Yuuki}"
def _(self, text, lang=None): def _(self, text, lang=None):
return self.gettext(text, lang) return self.gettext(text, lang)