-
-
Save anonymous/f259702a8dbb3e451cae to your computer and use it in GitHub Desktop.
Easy i18n Message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i18n = { | |
Lang: { | |
'WrongAns': ['答錯,請重新填寫。', '回答が間違います、改正してください。'], | |
'Undone': ['尚未填寫完畢。', '回答しない問題があるのでチェックしてください。'] | |
}, | |
getMsg: function (msg, lang) { | |
return this.Lang[msg][lang]; | |
} | |
} | |
alert(i18n.getMsg('Undone', 0)); //中文 | |
alert(i18n.getMsg('WrongAns', 1)); //日文 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment