diff --git a/wwwroot/i18n/language.ui b/wwwroot/i18n/language.ui new file mode 100644 index 0000000..25e5236 --- /dev/null +++ b/wwwroot/i18n/language.ui @@ -0,0 +1,35 @@ +{ + "id": "language", + "widgettype": "Text", + "options": { + "tip": "εˆ‡ζ’θ―­θ¨€", + "otext": "🌐", + "cwidth": 4, + "css": "clickable", + "cfontsize": 1.2 + }, + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "urlwidget", + "target": "Popup", + "popup_options": { + "eventpos": true, + "cwidth": 11, + "cheight": 10, + "dismiss_events": ["command"] + }, + "options": { + "url": "{{entire_url('menu.ui')}}" + } + }, + { + "wid": "app", + "event": "lang", + "actiontype": "script", + "target": "self", + "script": "this.set_otext(bricks.app.lang)" + } + ] +} diff --git a/wwwroot/i18n/menu.ui b/wwwroot/i18n/menu.ui new file mode 100644 index 0000000..ddea11a --- /dev/null +++ b/wwwroot/i18n/menu.ui @@ -0,0 +1,29 @@ +{ + "widgettype": "Menu", + "options": { + "cwidth": 11, + "target": "app", + "items": [ + { + "name": "zh", + "label": "δΈ­ζ–‡", + "script": "this.change_language('zh')" + }, + { + "name": "en", + "label": "English", + "script": "this.change_language('en')" + }, + { + "name": "jp", + "label": "ζ—₯本θͺž", + "script": "this.change_language('jp')" + }, + { + "name": "ko", + "label": "ν•œκ΅­μ–΄", + "script": "this.change_language('ko')" + } + ] + } +} diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 112ac7a..1a3d8ba 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -46,6 +46,18 @@ }, { "widgettype": "Filler" + }, + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('i18n/language.ui')}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('/rbac/user/user_panel.ui')}}" + } } ] },