Localization 如何本地化数据库struts获取的文本
要本地化任何文本,我们通常会这样做Localization 如何本地化数据库struts获取的文本,localization,struts-1,Localization,Struts 1,要本地化任何文本,我们通常会这样做 index.jsp <!--<span>hello</span>--> <span><bean:message key="index.hello"/></span> ApplicationResource_en.properties index.hello=hello ApplicationResource_es.properties index.hello=hola
index.jsp
<!--<span>hello</span>-->
<span><bean:message key="index.hello"/></span>
ApplicationResource_en.properties
index.hello=hello
ApplicationResource_es.properties
index.hello=hola
index.jsp
应用程序资源属性
index.hello=hello
应用程序资源属性
index.hello=hola
我的问题是如何像这样本地化动态文本
index.jsp
<span><bean:write "information" property="hello" />
index.jsp
请建议?您可以使用bean:message标记代替bean:write,如下所示
<bean:message bundle= "bundleKey" key= "a.message" />
Bundle是区域设置的名称