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
          主站蜘蛛池模板: 道孚县| 陈巴尔虎旗| 金华市| 江城| 民丰县| 衡阳县| 武城县| 瑞丽市| 固安县| 三门县| 上饶县| 那曲县| 甘孜县| 盐池县| 澜沧| 奎屯市| 红桥区| 开远市| 汉中市| 姚安县| 资溪县| 峨山| 牟定县| 枞阳县| 武清区| 北辰区| 古丈县| 曲阳县| 周至县| 安徽省| 安塞县| 和平区| 武宁县| 科技| 临湘市| 革吉县| 正定县| 繁昌县| 商丘市| 康定县| 荔波县|