mirror of
https://github.com/hyper-neptune/yuuki.git
synced 2024-11-16 03:14:36 +08:00
19 lines
452 B
Python
19 lines
452 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):
|
|
if lang:
|
|
return self.support[lang].i18nText[text]
|
|
return self.support[self.default].i18nText[text]
|
|
|
|
def _(self, text, lang=None):
|
|
return self.gettext(text, lang)
|