Re: RE: A I18N problem

zhaozj2021-02-16  60

Re: Re: A I18N question post: Robbin? 2003.07.02 ?????? What is the complexity of your methods, Java itself supports multi-language code, do not need to write any procedures, you can Simple implementation. The secret is two points: 1, all HTML / JSP pages are all UTF-8 encoding 2, the client browser fully supports the UTF-8 encoding step: 1, first set all the HTML / JSP's ContentType to UTF-8 2 , Then do not write in the program for the non-ASCII code prompt information in the JSP program, 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 like Google, hey, in fact, you have a word, look at what is your browser to visit Google, what is the character set: All HTML / JSP is set to UTF-8 encoding, all files Non-ASCII code characters must be converted to Unicode encoding represented by ASCII with Native2ASCII tools.

转载请注明原文地址:https://www.9cbs.com/read-16373.html

New Post(0)