在另一个eclipse项目中访问zk国际化标签

时间:2013-04-02 20:33:23

标签: zk

我的eclipse工作区中有多个项目,并希望共享i3标签文件以便在它们之间进行国际化。如何将国际化标签移动到另一个项目中的文件夹(commonProject)中,并查看它们?

目前在zk.xml中我有:

<system-config>
    <label-location>/commonProject/labels/i3-label_es_MX.properties</label-location>
    <label-location>/commonProject/labels/i3-label_fr_FR.properties</label-location>
    <label-location>/commonProject/labels/i3-label.properties</label-location>
</system-config>

但我无法访问标签。 (我得到一个空指针)

谢谢!

1 个答案:

答案 0 :(得分:3)

您当前的路径是相对servlet路径,但servlet是 没有加载你的标签,因为他们没有部署。
您可以添加系统路径,从DB或URL加载标签,
正如ZK-Doc中所述。

所以看起来像

<system-config>
    <label-location>file:///path/to/my/projects/commonProject/labels/i3-label_es_MX.properties</label-location>
    <label-location>file:///path/to/my/projects/commonProject/labels/i3-label_fr_FR.properties</label-location>
    <label-location>file:///path/to/my/projects/commonProject/labels/i3-label.properties</label-location>
</system-config>