Closed jackyrong closed 6 years ago
You just make one file which maps chinese text to english text. The site starts out in chinese and then "converts" to english when you switch language. If you switch back to chinese it restores the original text.
But I would have thought that struts would have its own l18n library / system to use? I don't use struts or Java but I'd research that first before choosing the system to use.
THANKS FOR reply my question,now my jsp is:
and i have two json,one is cn.json,the other is en.json? cn.json: { "token": { "province":"省份",
}
} en.json: { "token": { "province":"province",
}
} 省份:
are they right?
You only need ONE language pack for each EXTRA language. So if your page is already in Chinese, and you want to translate to English, you only need 1 pack, the "en" pack. This is because it uses your existing text as the token and then looks up that text and converts to the matching value in the en.json file. This is all fairly well documented in the readme.md file.
E.G HTML:
en.json:
{
"token": {
"省份": "province"
}
}
HI,nice to see this project,it sounds really help.now we are making a project which usesd written in struts2,and after we built,customer suddenly wanted to make a english version(we are chinese version),so i want to know if i use jquery-lang.js,should i make two json file?one is chinese version,the other is english version?