This commit is contained in:
yumoqing 2022-10-09 13:50:58 +08:00
parent d372b521c4
commit dc854b0695
2 changed files with 4 additions and 5 deletions

View File

@ -632,20 +632,18 @@ class Slider(Carousel):
w = bk.widgetBuild(desc)
self.add_widget(w)
i18n = None
class I18nWidget(PressableText):
lang = StringProperty(None)
def __init__(self, **kw):
super().__init__(**kw)
if i18n is None:
i18n = I18n()
i18n = I18n()
self.lang = i18n.lang
def on_lang(self, *args):
self.otext = self.lang
def on_press(self, *args):
i18n = I18n()
langs = i18n.get_languages()
data = [ {'lang':l} for l in langs ]
mdd = MyDropDown(textField='lang', valueField='lang',
@ -657,5 +655,6 @@ class I18nWidget(PressableText):
def selected_lang(self, o, v):
lang = v[0]
self.lang = lang
i18n = I18n()
i18n.changeLang(self.lang)

View File

@ -1 +1 @@
__version__ = '0.3.25'
__version__ = '0.3.26'