Java itself supports multi-language coding. You don't need to write any procedures, you can make it easy. The secret is two points:
1, all HTML / JSP pages are all UTF-8 encoding
2, client browser fully supports UTF-8 encoding
Steps: 1, first set all the HTML / JSP ContentType to UTF-8
2, and then you should be written in the program for the non-ASCII code prompt in the JSP program, and should be managed in Application.properties.
3. Do HTML with the Native2ASCII tool unified to handle, convert the non-ASCII code in HTML to Unicode encoding.
4. For different languages, write different Application.properties, such as Simplified Chinese is Application_ZH_CN.Properties, Traditional Chinese is Application_ZH_TW.Properties, then use the Native 12ASCII tool to handle it once, turn non-ASCII chimdom Encoded for Unicode.
5. Get the client's operating system default encoding, then set to the httpsession of the Struts.
OK! Different customer visits are now displayed different languages. You can look at the character set of your browser at this time, is UTF-8. Now your website is the same as Google, hey, in fact, what is your browser to visit Google?
Remember: All HTML / JSPs are set to UTF-8 encoding, and the non-ASCII code characters in all files must be converted to Unicode encoding represented by ASCII.