struts2 Locale

STRUTS2 多国语言的设置

 

    Locale locale = null;
    if(language.equals("zh_CN"))
     locale = Locale.CHINA;
    if(language.equals("en_US"))
     locale = Locale.US;
    ActionContext.getContext().setLocale(locale);
    super.setAttaToSession("WW_TRANS_I18N_LOCALE",locale);

这样就可以设置 浏览器浏览的语言版本。

 

 

request_locale=en_US


are you sure you want to delete it?

你可能感兴趣的:(struts2 Locale)