多语言支持
基本用法
现在,Valine
开始支持多语言。默认内置:
zh-CN
zh-TW
en
ja
new Valine({
el:'#vcomment',
appId:'Your appId',
appKey:'Your appKey',
lang:'en' // 设置这里就ok
})
自定义语言
自定义语言只需两步:
- 定义
langName
和langMode
- 初始化 Valine
请严格按照下面的
langMode
格式书写内容:
// 1.定义 langName 和 langMode
var langName = 'en',
langMode = {
"nick": "NickName",
"mail": "E-Mail",
"link": "Website(http://)",
"nickFail":"NickName cannot be less than 3 bytes.",
"mailFail":"Please confirm your email address.",
"sofa": "No comment yet.",
"submit": "Submit",
"reply": "Reply",
"cancelReply": "Cancel reply",
"comments": "Comments",
"cancel": "Cancel",
"confirm": "Confirm",
"continue": "Continue",
"more": "Load More...",
"preview": "Preview",
"emoji": "Emoji",
"expand": "See more....",
"seconds": "seconds ago",
"minutes": "minutes ago",
"hours": "hours ago",
"days": "days ago",
"now": "just now",
"uploading":"Uploading ...",
"uploadDone":"Upload completed!",
"busy":"Submit is busy, please wait...",
"code-98":"Valine initialization failed, please check your version of av-min.js.",
"code-99": "Valine initialization failed, Please check the `el` element in the init method.",
"code-100": "Valine initialization failed, Please check your appId and appKey.",
"code-140":"The total number of API calls today has exceeded the development version limit.",
"code-401": "Unauthorized operation, Please check your appId and appKey.",
"code-403": "Access denied by API domain white list, Please check your security domain."
};
// 2.初始化 Valine
new Valine({
el:'#vcomment',
appId:'Your appId',
appKey:'Your appKey',
lang: langName,
langMode: langMode
})
v1.1.8-beta9
开始支持。
© 2017 - 2024
Powered By xCss.
Powered By xCss.