浏览 5657 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2004-10-05
<message-resources parameter="/myPkg/properties/AppResources" /> 这样的配置条目?<ww:text name="" />无法找到对应的key. 另外如果要用到i18n还有多个Bundle的情况. 在官方文档中也没有找到相关的说明(还是我找得不够仔细???), 谁能提示一下呀? 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2004-10-05
http://wiki.opensymphony.com/display/WW/Internationalization
|
|
返回顶楼 | |
发表时间:2004-10-06
再看了一遍Internationalization...终于明白了一点...Thx~~~~
|
|
返回顶楼 | |
发表时间:2004-10-21
我看了webwork的例子其中的i18n里的java文件中没有使用资源包中的key呀,难道资源包只能在jsp中使用吗,能不能像struts一样可以在java中调用呢?
|
|
返回顶楼 | |
发表时间:2004-10-21
目前的WW2的这部分我觉得是有待改进的,当然自己实现也很简单。
参见 http://forum.iteye.com/viewtopic.php?p=43169#43169 这样就可以做到有全局缺省Resousebundle,Class对应的Resousebundle直接用<ww:text name="xxx" />访问,用<ww:i18n name="yyy"><ww:text name="xxx" /></ww:i18n>作特殊访问。 在java中调用就是getText方法。在ActionSupport中。 |
|
返回顶楼 | |
发表时间:2004-12-17
lllyq 写道 目前的WW2的这部分我觉得是有待改进的,当然自己实现也很简单。
参见 http://forum.iteye.com/viewtopic.php?p=43169#43169 这样就可以做到有全局缺省Resousebundle,Class对应的Resousebundle直接用<ww:text name="xxx" />访问,用<ww:i18n name="yyy"><ww:text name="xxx" /></ww:i18n>作特殊访问。 在java中调用就是getText方法。在ActionSupport中。 下面来自webwork文档 Struts users should be familiar with the application.properties resource bundle, where you can put all the messages in the application that are going to be translated. WebWork2, though, splits the resource bundles per action or model class, and you may end up with duplicated messages in those resource bundles. A quick fix for that is to create a file called ActionSupport.properties in com/opensymphony/xwork and put it on your classpath. This will only work well if all your actions subclass ActionSupport. Global resource bundles can also be specified via setting the webwork.custom.i18n.resources in webwork.properties. |
|
返回顶楼 | |
发表时间:2005-03-27
http://wiki.opensymphony.com/display/WW/webwork.properties
注意例子的最后一行,我已经测试通过 |
|
返回顶楼 | |