Skip to content

Commit

Permalink
Language settings optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamToki committed Nov 7, 2024
1 parent 8f53107 commit eeadd5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions PROJECT/KanaMaster/scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,14 @@
function Load() {
if(localStorage.System != undefined) {
System = JSON.parse(localStorage.getItem("System"));
} else {
System.I18n.Language = "zh-CN";
}
switch(System.I18n.Language) {
case "Auto":
/* navigator.language ... */
break;
case "en-US":
/* ChangeCursorOverall("wait");
window.location.replace("index_" + System.I18n.Language + ".html"); */
ShowDialog("System_LanguageUnsupported",
"Error",
"<span lang=\"en-US\">Sorry, this page currently does not support English (US).</span>",
Expand All @@ -142,8 +145,6 @@
"", "", "", "<span lang=\"ja-JP\">OK</span>");
break;
case "zh-CN":
/* ChangeCursorOverall("wait");
window.location.replace("index.html"); */
break;
case "zh-TW":
ShowDialog("System_LanguageUnsupported",
Expand Down
2 changes: 1 addition & 1 deletion PROJECT/scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
PlayAudio: true
},
I18n: {
Language: "Unset"
Language: "Auto"
},
Dev: {
TryToOptimizePerformance: false,
Expand Down

0 comments on commit eeadd5c

Please sign in to comment.