1. Add Multilingual Files *.properties
F64_en_en.properties details are as follows:
f60_g00_m100= pleaseselect data. f60_g00_m101=are you sure do want to delete? f60_g00_m102=the data is changed. Does want to save it?
2. Configuring the SPRINGMVC configuration file
<BeanID= "Messagesource"class= "Org.springframework.context.support.ResourceBundleMessageSource"> < Propertyname= "Basenames"> <List>
<!--Follow-up development requires an internationalized module to be added here-- <value>i18n. Example</value> </List> </ Property> < Propertyname= "Defaultencoding"value= "UTF-8" /> < Propertyname= "Usecodeasdefaultmessage"value= "true" /></Bean><!--set up an internationalized multi-language for cookie interpreter analysis Settings -<Beanclass= "Org.springframework.web.servlet.i18n.LocaleChangeInterceptor" /><BeanID= "Localeresolver"class= "Org.springframework.web.servlet.i18n.CookieLocaleResolver"> < Propertyname= "Cookiemaxage"value= "315360000" /> < Propertyname= "Defaultlocale"value= "En_en" /> < Propertyname= "CookieName"value= "Language">
</ Property></Bean>
3. Modify the language of the running environment after successful login
// if ("EN" .equals (Logonuser.getlanguage ()) {Locale Localeen = new Locale (" en "," en " else if ("JA" .equals (Logonuser.getlanguage ())) {Locale LOCALEJP = new Locale ("ja", "JP" else {Locale Localeen = new Locale ("en", "en"
4. Define methods for acquiring classical Chinese content
protected string GetMessage (String code,object ... params) {return messagesource.getmessage (code, params, Localecontextholder.getlocale ());}
5. Acquisition of Classical Chinese content
String title = GetMessage ("rf64_l001");
[Spring] Spring MVC for internationalization/multi-language