mirror of
https://github.com/star-inc/yuuki.git
synced 2024-11-14 11:55:58 +08:00
22 lines
613 B
Python
22 lines
613 B
Python
#!/usr/bin/python3
|
|
# coding=UTF-8
|
|
|
|
from .en import English
|
|
|
|
class Yuuki_LangSetting:
|
|
def __init__(self, default):
|
|
self.default = default
|
|
self.support = {
|
|
"en":English
|
|
}
|
|
|
|
def gettext(self, text, lang=None):
|
|
try:
|
|
if lang:
|
|
return self.support[lang].i18nText[text]
|
|
return self.support[self.default].i18nText[text]
|
|
except KeyError:
|
|
return text + "\n\n{\n\tLanguage Package is not Work.\n\tPlease inform the Admin of the Yuuki.\n}"
|
|
|
|
def _(self, text, lang=None):
|
|
return self.gettext(text, lang)
|