Commit 5ee3396a by Masaru Abe

中国語対応

parent ab61a318
......@@ -43,6 +43,7 @@
<option value="language-ko">한글</option>
<option value="language-th">ภาษาไทย</option>
<option value="language-in">Indonesia</option>
<option value="language-cn">中文</option>
</select>
</li>
<li style="padding-left:0;"><input id="searchbox-key" type="text" placeholder="キーワードを入力してください"></li>
......
......@@ -38,6 +38,7 @@ var Consts = {
ConstLanguage_Ko: "ko",
ConstLanguage_Th: "th",
ConstLanguage_In: "in",
ConstLanguage_Cn: "cn",
// API result: success
ConstAPI_SUCCESS: "success",
......
......@@ -43,10 +43,10 @@ $(function() {
});
/* ブラウザの言語設定を取得する */
function getNavigatorLanguage() {
var lang = (navigator.browserLanguage || navigator.language || navigator.userLanguage);
var lang = (navigator.browserLanguage || navigator.language || navigator.userLanguage);
/* 対応言語 */
var languages = ['ja','ko','en','th','in']; // 対応言語を増やす場合はここを変更する
if(lang.match(/ja|ko|en|th|in/g)) {
var languages = ['ja','ko','en','th','in','cn']; // 対応言語を増やす場合はここを変更する
if(lang.match(/ja|ko|en|th|in|cn/g)) {
for(var i = 0; i < languages.length; i++) {
var index = lang.indexOf(languages[i]);
if(index >= 0) {
......@@ -55,8 +55,8 @@ function getNavigatorLanguage() {
}
}
} else {
lang = 'en'; // 対応言語が無ければ英語をデフォルトとする
}
lang = 'en'; // 対応言語が無ければ英語をデフォルトとする
}
return lang;
};
......
{
"sysErrorCallApi01":"发生系统错误。<br/>请重启浏览器后重新登录,或稍后再试试。",
"sysInfoScrLock01":"由于长时间没有操作,屏幕已被锁定。<br/>请点击屏幕解锁。",
"sysInfoWithoutLogout":"您正尝试不退出登录而直接关闭程序。\n※[注]如果不退出登录一定时间后帐号将会被锁定。",
"txtUsrCap":"用户信息",
"txtLastLoginTime":"最后登录时间:",
"txtOpt":"选项",
"txtOpt001":"初始显示",
"txtHondana":"书架",
"txtList":"列表",
"txtOpt002":"重复播放视频和音乐",
"txtOpt003":"记号",
"dspOptReset":"恢复初始设置",
"txtBkResCap":"备份/恢复到服务器",
"txtOptBkCfm":"退出时检查备份",
"dspOptBk":"备份",
"dspOptRes":"恢复",
"dspSave":"保存",
"txtBkMsg":"您确定要把数据备份到服务器吗?",
"txtResMsg":"您确定要从服务器恢复数据吗?",
"msgPwdEmpty":"请输入密码",
"msgPwdOldWrong":"当前密码错误",
"msgPwdNotMatch":"更改密码不匹配。",
"msgLoginErrWrong":"无法登录。请检查输入的信息。(错误代码:{0})",
"dspPubDt2":"发行日期:",
"txtPage":"页面:",
"dspDelete":"删除",
"dspShioriDelConf":"您确定要删除已选择的书签吗?",
"dspRegDt":"注册日期",
"dspLogin":"登录",
"dspSkip":"跳过",
"dspPwdUpd":"更改密码",
"txtLoginAccPath":"帐户字符串(企业ID):",
"txtLoginId":"用户ID:",
"txtLoginPwd":"密码:",
"txtLoginPwdRbr":"存储用户ID和企业ID",
"txtPwdCurr":"当前密码",
"txtPwdNew":"更改密码",
"txtPwdNewRe":"(再)更改密码",
"txtPwdRemind":"※如果您选择跳过,30天此信息不会出现",
"txtSearch":"搜索",
"dspShiori":"书签",
"dspSetting":"设置",
"dspLogout":"退出",
"txtRead":"阅读",
"txtSort":"排序",
"dspTitleNm":"标题",
"dspTitleNmKn":"标题(假名)",
"txtPubDt":"发布日期",
"txtRecordNum":"条",
"txtRecordTotal":"条 显示",
"dspViewMore":"下一页>>",
"txtGen":"类型",
"txtGr":"组",
"txtViewDt":"查看日期",
"txtDetailPage":"详细页面",
"txtCtnNm":"内容名称",
"txtTag":"标签",
"txtContTxt":"正文",
"txtLogoutBkMsg":"您确定要备份后退出?",
"txtLogoutOptBkCfm":"存储此次的行为。",
"dspBkOK":"备份后退出",
"dspBkCancel":"不备份退出",
"txtSearchResult":"搜索结果",
"dspHome":"首页",
"txtLoginUser":"(Ver.20140822):",
"txtAll":"所有",
"txtMkgSize":"厚度",
"txtMkgS":"小",
"txtMkgM":"中",
"txtMkgB":"大",
"txtMkgSB":"特大",
"dspOK":"OK",
"dspCancel":"取消",
"txtMkToolBar":"记号",
"dspPgClear":"清除此页面",
"txtColor":"颜色",
"txtIndex":"索引",
"txtShioriCtnLs":"书签列表",
"txtTextCopy":"复制文本",
"txtNoTextCopy":"没有文字。",
"txtNoSearchResult":"没有搜索结果。",
"msgShioriNotExists":"没有书签",
"msgPwdChangeOK":"密码已更改。",
"msgPwdChangeNG":"更改密码失败。请重新输入。※注:新的密码必须包含数字和英文字母。",
"msgSearchNotExist":"没有和条件匹配的内容。",
"txtTooltipBack":"返回",
"txtTooltipBookmark":"添加/删除书签",
"txtTooltipShowMemo":"显示/隐藏备忘录",
"txtTooltipAddMemo":"添加备忘录",
"txtTooltipShowMarking":"显示或隐藏标记",
"txtTooltipShowMarkingTool":"显示或隐藏标记工具栏",
"msgShioriDeleted":"该网页已被删除。",
"dspViewHistory":"历史记录",
"msgLoginEmpty":"请输入您的登录信息",
"msgSaveOk":"已保存",
"msgPlaceHolder":"请输入关键字",
"txtOpt004":"※打开内容时显示",
"txtRestoreTitle":"恢复确认",
"txtBackupTitle":"备份确认",
"txtResMsgNotice":"※如果运新恢复,将以本地终端的数据覆盖服务器端的备份数据。恢复后,无法回到恢复前的状态,请注意。",
"dspChange":"更改",
"msgNoIndex":"没有索引",
"msgBackupSuccess":"已成功完成备份",
"msgBackupFailed":"备份失败",
"msgRestoreSuccess":"恢复成功完成",
"msgRestoreFailed":"恢复失败",
"txtDeleteConfirmTitle":"书签删除确认",
"msgHistoryNotExist":"没有浏览历史记录。",
"msgChangePassword":"更改密码",
"txtMemoEdit":"编辑",
"txtMemoCopy":"复制",
"msgPageImgErr":"无法显示所选择的内容。该内容可能已被删除。",
"sysAppTitle":"VISUAMALL Smart Catalog Web App",
"sysLockScrPwdInput":"请输入密码",
"txtOpt005":"关闭多标签浏览器或按F5时显示警告",
"txtMemoMenu":"编辑备忘录",
"txtMemoNew":"新建",
"txtMemoPaste":"粘贴",
"txtMemoClear":"清除",
"txtMemo":"备忘录",
"msgBGMPlayConfirm":"内容的背景音乐会自动播放。",
"msgPWDNeedChange":"需要更改密码。请返回修改设置页面进行更改。",
"msgBGMPagePlayConfirm":"页面的背景音乐会自动播放。"
}
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20140625_01):",
"txtLoginUser":"(Ver.20140822):",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout tanpa back-up",
"txtSearchResult":"Hasil pencarian",
"dspHome":"Beranda",
"txtLoginUser":"(Ver.20140625_01):",
"txtLoginUser":"(Ver.20140822):",
"txtAll":"Semua",
"txtMkgSize":"Ukuran",
"txtMkgS":"Kecil",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20140625_01):",
"txtLoginUser":"(Ver.20140822):",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20140625_01):",
"txtLoginUser":"(Ver.20140822):",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"ล็อกเอ้าท์โดยไม่สำรองข้อมูล",
"txtSearchResult":"ผลการค้นหา",
"dspHome":"หน้าหลัก",
"txtLoginUser":"(Ver.20140625_01):",
"txtLoginUser":"(Ver.20140822):",
"txtAll":"ทั้งหมด",
"txtMkgSize":"ขนาด",
"txtMkgS":"เล็ก",
......
......@@ -40,6 +40,7 @@
<option value="language-ko">한글</option>
<option value="language-th">ภาษาไทย</option>
<option value="language-in">Indonesia</option>
<option value="language-cn">中文</option>
</select>
</li>
<li style="padding-left:0;"><input id="searchbox-key" type="text" placeholder="キーワードを入力してください"></li>
......
......@@ -39,6 +39,7 @@
<option value="language-ko">한글</option>
<option value="language-th">ภาษาไทย</option>
<option value="language-in">Indonesia</option>
<option value="language-cn">中文</option>
</select>
</li>
<li style="padding-left:0;"><input id="searchbox-key" type="text" placeholder="キーワードを入力してください"></li>
......
......@@ -44,6 +44,7 @@
<option value="language-ko">한글</option>
<option value="language-th">ภาษาไทย</option>
<option value="language-in">Indonesia</option>
<option value="language-cn">中文</option>
</select>
</li>
<li style="padding-left:0;"><input id="searchbox-key" type="text" placeholder="キーワードを入力してください"></li>
......
......@@ -43,6 +43,9 @@ $(document).ready(function () {
case "language-in":
changeLanguageIn();
break;
case "language-cn":
changeLanguageCn();
break;
default:
changeLanguageJa();
......@@ -291,6 +294,13 @@ function changeLanguageIn(){
$("#searchbox-key").attr('placeholder', i18nText('msgPlaceHolder'));
};
function changeLanguageCn(){
changeLanguage(Consts.ConstLanguage_Cn);
if(window.changeLanguageCallBackFunction){
changeLanguageCallBackFunction();
}
$("#searchbox-key").attr('placeholder', i18nText('msgPlaceHolder'));
};
//Shiori function
function bookmarkFunction(){
......
......@@ -430,6 +430,14 @@ function changeLanguageIn(){
}
};
function changeLanguageCn(){
changeLanguage(Consts.ConstLanguage_Cn);
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
if (login_errorMessage != ""){
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), login_errorMessage).toString());
}
};
//Login click function
function loginFunction(){
if (checkValidation()) {
......@@ -549,7 +557,7 @@ $(document).ready(function (e) {
initialScreen();
//Change language
$('#changeLanguage').change(function() {
$('#changeLanguage').change(function() {
switch($(this).val()) {
case "language-ja":
changeLanguageJa();
......@@ -568,6 +576,9 @@ $(document).ready(function (e) {
case "language-in":
changeLanguageIn();
break;
case "language-cn":
changeLanguageCn();
break;
default:
changeLanguageJa();
......
......@@ -43,6 +43,7 @@
<option value="language-ko">한글</option>
<option value="language-th">ภาษาไทย</option>
<option value="language-in">Indonesia</option>
<option value="language-cn">中文</option>
</select>
</li>
<li style="padding-left:0;"><input id="searchbox-key" type="text" placeholder="キーワードを入力してください"></li>
......
......@@ -43,6 +43,7 @@
<option value="language-ko">한글</option>
<option value="language-th">ภาษาไทย</option>
<option value="language-in">Indonesia</option>
<option value="language-cn">中文</option>
</select>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment