mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
fix
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<tr>
|
||||
<td i18n="password">Password: </td>
|
||||
<td>
|
||||
<input type="password" id="passwd-input" autocapitalize="off">
|
||||
<input type="current-password" id="passwd-input" autocapitalize="off">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -26,8 +26,8 @@ block body
|
||||
td(i18n="select_language") Select language:
|
||||
td
|
||||
select(id="selectLanguage")
|
||||
option(value='ch', selected="selected" class="chinese" i18n="chinese") Simplified Chinese
|
||||
option(value='en' class="english" i18n="english") English
|
||||
option(id='zh', selected="selected" i18n="chinese") Simplified Chinese
|
||||
option(id='en' i18n="english") English
|
||||
tr
|
||||
td
|
||||
td #[button(id="login-button" class="key" i18n="login") Login]
|
||||
|
||||
@@ -29,7 +29,7 @@ function getCookie(name)
|
||||
/**
|
||||
* 设置语言类型: 默认为中文
|
||||
*/
|
||||
var i18nLanguage = "cn";
|
||||
var i18nLanguage = "zh";
|
||||
|
||||
$(document).ready(function() {
|
||||
/* 首先获取用户选择过的语言 */
|
||||
@@ -47,21 +47,16 @@ $(document).ready(function() {
|
||||
|
||||
}
|
||||
});
|
||||
/*切换为中文 - 按钮*/
|
||||
$(".chinese").click(function() {
|
||||
|
||||
$("#selectLanguage").change(function() {
|
||||
var selectOptionId = $(this).children("option:selected").attr("id");
|
||||
console.log(selectOptionId);
|
||||
$("[i18n]").i18n({
|
||||
defaultLang: "cn",
|
||||
defaultLang: selectOptionId,
|
||||
filePath: "/share/i18n/"
|
||||
});
|
||||
setCookie('userLanguage', "cn")
|
||||
});
|
||||
/*切换为英文 - 按钮*/
|
||||
$(".english").click(function() {
|
||||
$("[i18n]").i18n({
|
||||
defaultLang: "en",
|
||||
filePath: "/share/i18n/"
|
||||
});
|
||||
setCookie('userLanguage', "en")
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user