2013-04-02 27 views
0

我在我的eclipse工作區中有多個項目,並希望共享它們之間國際化的i3標籤文件。如何將國際化標籤移動到另一個項目的文件夾(commonProject)中,然後查看它們?在另一個eclipse項目中訪問zk國際化標籤

現在在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> 

但我不能訪問標籤。 (我得到一個空指針)

謝謝!

回答

3

您當前的路徑是一個相對的servlet路徑,但servlet
不會加載您的標籤,因爲它們沒有部署。
ZK-Doc中所述,您可以添加系統路徑,加載數據庫或URL中的標籤,

因此,它可能看起來像

<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>