文件如何定义:
/config/XXXUILabels.xml
<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<property key="AjaxExamples">
<value xml:lang="en">Ajax Examples</value>
<value xml:lang="fr">Exemples Ajax</value>
<value xml:lang="it">Esempi Ajax</value>
<value xml:lang="zh">应用程序</value>
</property>
<property key="AjaxIntro">
<value xml:lang="en">To use this Ajax demonstration, you must have JavaScript enabled on your browser.</value>
<value xml:lang="fr">Pour utiliser cette démonstration Ajax, vous devez avoir activé Javascript </value>
<value xml:lang="it">Per usare questa dimostrazione Ajax, tu devi avere JavaScript abilitato sul tuo browser.</value>
</property>
</resource>
如何加载:
ofbiz-component.xml
<classpath type="dir" location="config"/>
导入 定义统一名字
CommonScreen.xml
<screen name="main-decorator">
<section>
<actions>
<!-- base/top/specific map first, then more common map added for shared labels -->
<property-map resource="XXXUILabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
</widgets>
</section>
</screen>
实际应用 比如Screen.xml
<screen name="Test">
<section>
<actions>
<set field="headerItem" value="***"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="component://XXX/widget/CommonScreen.xml">
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
</condition>
<widgets>
<container style="h1"><label>
${uiLabelMap.AjaxExamples}</label></container>
。。。。。
<fail-widgets>
<label style="h3">${uiLabelMap.ExampleViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
最后想知道的是如何 让前台显示
<value xml:lang="en">Ajax Examples</value>
<value xml:lang="fr">Exemples Ajax</value>
<value xml:lang="it">Esempi Ajax</value>
<value xml:lang="zh">应用程序</value>
是其中的哪一种值得呢
经查找 OFBiz启动时候 一开始回去load
start.properties
此文件中配置有
ofbiz.locale.default=zh 或者
ofbiz.locale.default=en
但 经过比对 发现 此处设置 根本无效
非常期待 得到解决
另外有一种解释
参考 http://hi.baidu.com/lcjbest/item/b066565f0567ab17aaf6d799
具体某个模块 项目加载的时候 配置初始化参数
ofbiz-component.xml
<webapp name="ecommerce"
title="eCommerce"
server="default-server"
location="webapp/ecommerce"
mount-point="/ecommerce"
app-bar-display="false">
<init-param name="Locale" value="zh"/>
<init-param name="Currency" value="CNY"/>
</webapp>
分享到:
相关推荐
ofbiz 国际化,非常简单的例子ofbiz-component.xml
OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门
自学整理的ofbiz学习笔记,自学整理的ofbiz学习笔记,自学整理的ofbiz学习笔记,自学整理的ofbiz学习笔记,适合初学者,可以下个看看
像 Tomcat, Ant, BeanShell, Jboss 等,构建了一个强大的系统平台,Ofbiz 已经完成了大部分商务类软件系统 都需要的部件,像用户认证、工作流、商务规则处理等,Ofbiz 的核心技术在于 Entity Engine,其他的组件基本...
ofbiz的获取与部署,主要用到了gradle 和 eclipse,注意:cmd部署时,需要一个较好的网络环境以下载gradle
里面是下载地址,如果逆向开发ofbiz,只要下载它就绝对没错了 Apache+OFBiz+开发初学者指南.rar OFBiz开发快速入门.rar OFBiz-技术文档.rar OFBiz API中文版.rar Apache OFBiz Cookbook Sep 2010.rar Opentaps ...
OFBiz集成Spring和Activiti,详细设计说明书。ofbiz版本12.04
ofbiz jar file, some jars for ofbiz
ofbiz sql 表结构
ofbiz数据结构
浅谈OFBIZ.doc浅谈OFBIZ.doc浅谈OFBIZ.doc浅谈OFBIZ.doc浅谈OFBIZ.doc
OFBIZ开发指南 英文2OFBIZ开发指南 英文2OFBIZ开发指南 英文2
CVE-2020-9496 ofbiz反序列化漏洞分析1
关于ofbiz的资料,很多,用ofbiz技术的朋友们赶快下载吧
ofbiz权限非常介绍,ofbiz进阶之权限介绍!
OFBiz 主题修改文档
ofbiz 配置说明 ,Simple method 使用的分析,对of biz 系统整体的理解
apache-ofbiz-16.11.02.zip,ofbiz菜鸟笔记,Apache+OFBiz+开发初学者指南.chm
ofbiz 官网文档翻译 ,按照此文档里面的步骤,可以安全快速的编译自己的第一个小模块 "Hello World",一开始是很抵触的,但是学着学着发现其实框架道理是相似的,为了将代码解耦,每个框架都有自己的独特解耦之道和...
使用entity-auto服务实现增加、修改、删除提示国际化 9 Ofbiz的电商的新建用户逻辑 10 ofbiz导出的PDF中文乱码 10 外部系统调用Ofbiz中的服务方法 11 Ofbiz的Content管理 12 OFBiz的MVC框架 12 OFBiz服务引擎 14 ...