首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

displaytag中运用struts的国际化资源

2012-11-16 
displaytag中使用struts的国际化资源使用displaytag打印表格的时候,表头有时需要使用国际化资源,这些资源

displaytag中使用struts的国际化资源
    使用displaytag打印表格的时候,表头有时需要使用国际化资源,这些资源往往是properties文件。在开发中各种框架都有自己的国际化资源规则,JSTL,struts,spring,默认displaytag会读取jstl制定的资源文件。
    TODO: JSTL, Struts, spring i18n
    项目中原有框架(类似appfuse)把struts和jstl的国际化资源都指向ApplicationContext,这个文件是struts的默认资源文件。项目中,struts在struts-plugin.xml中制定


http://struts.apache.org/2.x/docs/constant-configuration.html

    jstl则是通过web.xml中制定


I18nJstlAdapter,I18nSpringAdapter分别对应jstl和spring。
对于资源文件:You don't need to copy all the properties in any internationalized file (some of them are also configuration properties which don't need to be translated at all). Configure displaytag properly in the main displaytag.properties file and then replicate only the strings you want to translate.

reference:http://displaytag.sourceforge.net/1.2/i18n.html

热点排行