9910

          單飛

             :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
          Plugin.properties放在plugin.xml的相同目錄下, Eclipse里面看國際化也是非常正確, 但是運行以后就是只顯示"%XXXX"這樣的字符串原來是因為

          Localization in RCP plugins is usually done by including translations in a property file and using their id in plugin.xml.

          I spend some time lately trying to understand why some translations were not used in my application although they were correctly displayed in PDE.

          Answer : when using plugin.properties, you MUST include the following line in the plugin manifest :

          Bundle-Localization: plugin

          Otherwise, PDE will show the translated text, but your app won’t.

          Strangely, I had to edit the manifest manually because I couldn’t find a way to enable plugin localization in PDE. Some other plugins of my application already had this line, but I don’t remember adding it. Maybe Eclipse templates have changed since I created my first plugins (using Eclipse 3.1).


          記得以前插件開發(fā)也有這個問題,不過忘記了。
          真是記性越來越差了。
          這個問題竟然困擾了我兩個星期。還好可以google到別人的解決辦法,今天在這里留個腳印。
          posted on 2009-01-23 11:42 單飛 閱讀(532) 評論(0)  編輯  收藏 所屬分類: Eclipse Plugin
          主站蜘蛛池模板: 石河子市| 荔浦县| 福泉市| 尉氏县| 白城市| 马尔康县| 安仁县| 邳州市| 博乐市| 鹤岗市| 宿迁市| 铅山县| 松溪县| 原阳县| 砀山县| 繁昌县| 朝阳市| 满城县| 平安县| 株洲县| 蓬安县| 周口市| 田阳县| 湘乡市| 宣武区| 克拉玛依市| 景德镇市| 高清| 青岛市| 吉木萨尔县| 清新县| 江山市| 新竹县| 镇赉县| 鹤峰县| 丹巴县| 西乡县| 兴海县| 弥勒县| 韩城市| 噶尔县|