参考文档http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/Internationalization/Labels
文档中说国际化很简单,资源文件放在WEB-INF下,文件名固定,都是i3-label.properties,简体中文的就是i3-label_zh_CN.properties。
按照官方文档说的,修改Locale就是:
session.setAttribute(Attributes.PREFERRED_LOCALE,xxxLocale)
public void langSelect(){
Locale locale=Locales.getLocale((String)language.getSelectedItem().getValue());
session.setAttribute("px_preferred_locale", locale);
execution.sendRedirect(execution.getContextPath()+ "/login.zul");
}
但是根本不好使,后来搜索了下,发现需要设置:
Locales.setThreadLocal(xxxLocale)