struts2 action中如何读取国际化资源文件
action中如何读取国际化资源文件
1、在url地址中使用?request_locale=en_US 或 ?request_locale=zh_CN
2、在action中,this.getText("helloworld");?? //得到国际化资源文件中对应的中文, 或是英文
helloworld=hello, {0}????? 使用this.getText("helloworld", new String[]{"张三"})? 初始化点位符