首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

struts2 action中怎么读取国际化资源文件

2012-09-21 
struts2 action中如何读取国际化资源文件action中如何读取国际化资源文件1、在url地址中使用?request_local

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[]{"张三"})? 初始化点位符

热点排行