BlackBerry模拟器中文支持

    修改安装目录下(如:…BlackBerry JDE5.0.0\simulator或者…\Research In Motion\BlackBerry Smartphone Simulators 5.0.0\5.0.0.484 (9500_EastAsia))的device.xml

    例如9550机型为 9550.xml

    打开会看到:

<SimulatorConfiguration version=”1.0″ hardwareid=”0x0C001404″ flashSize=”32768″ platformVersion=”1.8.0.0″ vendorID=”0″>


   <ALXSources>.</ALXSources>
   <Application>net.rim.java.tasks</Application>
   <Application>net.rim.java.memopad</Application>
   <Application>net.rim.medialoader.preloaded.media</Application>
   <Application>net.rim.java.docViewer</Application>
   <Application>net.rim.java.passwordkeeper</Application>
   <Application>net.rim.blackberry.lang.en_GB</Application>
   <Application>net.rim.blackberry.spellcheck</Application>
   <Application>net.rim.platform.ecmascript</Application>
   <Application>com.dataviz.dxtg</Application>
   <Application>com.magmic.sudoku</Application>
   <Application>com.magmic.klondike</Application>
   <Application>com.magmic.troopertyping</Application>
   <Application>net.rim.device.apps.internal.appcenter</Application>
   <Application>net.rim.java.maps</Application>
   <Application>com.magmic.thk2</Application>
   <Application>net.rim.java.phone</Application>
   <Application>net.rim.java.browser</Application>
   <Application>net.rim.java.browser.javascript</Application>
   <ApplicationExclude>net.rim.BBXpEnabler</ApplicationExclude>
   <ApplicationExclude>net.rim.java.batterylog</ApplicationExclude>
   <ApplicationExclude>net.rim.java.quincy</ApplicationExclude>
   <ApplicationExclude>net.rim.java.linktrack</ApplicationExclude>
   <Application>net.rim.java.help</Application>
   <Application>net.rim.java.maps</Application>
   <Application>net.rim.sdk.simulator</Application>
<ApplicationExclude>com.pv.MOD</ApplicationExclude>
<ApplicationExclude>VodafoneMusic</ApplicationExclude>
<ApplicationExclude>VZNavigator</ApplicationExclude>
</SimulatorConfiguration>

     在模拟器启动时候会按照这个xml列表下的东西加载。中间有句加粗的就是为语言设置。所以只需要加入:

   <Application>net.rim.blackberry.lang.zh_CN_Pinyin</Application>
   <Application>net.rim.blackberry.lang.zh_CN.renderingSupport</Application>

就可以了。

最终结果如:

<SimulatorConfiguration version=”1.0″ hardwareid=”0x0C001404″ flashSize=”32768″ platformVersion=”1.8.0.0″ vendorID=”0″>
   <ALXSources>.</ALXSources>
   <Application>net.rim.java.tasks</Application>
   <Application>net.rim.java.memopad</Application>
   <Application>net.rim.medialoader.preloaded.media</Application>
   <Application>net.rim.java.docViewer</Application>
   <Application>net.rim.java.passwordkeeper</Application>
  <Application>net.rim.blackberry.lang.en_GB</Application>
   <Application>net.rim.blackberry.lang.zh_CN_Pinyin</Application>
   <Application>net.rim.blackberry.lang.zh_CN.renderingSupport</Application>
   <Application>net.rim.blackberry.spellcheck</Application>
   <Application>net.rim.platform.ecmascript</Application>
   <Application>com.dataviz.dxtg</Application>
   <Application>com.magmic.sudoku</Application>
   <Application>com.magmic.klondike</Application>
   <Application>com.magmic.troopertyping</Application>
   <Application>net.rim.device.apps.internal.appcenter</Application>
   <Application>net.rim.java.maps</Application>
   <Application>com.magmic.thk2</Application>
   <Application>net.rim.java.phone</Application>
   <Application>net.rim.java.browser</Application>
   <Application>net.rim.java.browser.javascript</Application>
   <ApplicationExclude>net.rim.BBXpEnabler</ApplicationExclude>
   <ApplicationExclude>net.rim.java.batterylog</ApplicationExclude>
   <ApplicationExclude>net.rim.java.quincy</ApplicationExclude>
   <ApplicationExclude>net.rim.java.linktrack</ApplicationExclude>
   <Application>net.rim.java.help</Application>
   <Application>net.rim.java.maps</Application>
   <Application>net.rim.sdk.simulator</Application>
<ApplicationExclude>com.pv.MOD</ApplicationExclude>
<ApplicationExclude>VodafoneMusic</ApplicationExclude>
<ApplicationExclude>VZNavigator</ApplicationExclude>
</SimulatorConfiguration>

   最后你就可以在options\language (4.1版本以下)、options\Localisation(4.2、4.5等版本)或者options\Language and Text Input(5.0版本)下面设置语言了。

    请注意,经测试通过以上方法大多数机型都可以显示简体中文,但是95系列却不成功,95系列需要加入的内容是以下几行:

  <Application>net.rim.blackberry.lang.zh_CN</Application>
  <Application>net.rim.blackberry.lang.zh_CN.defaultResource</Application>
  <Application>net.rim.blackberry.lang.zh_CN.localization</Application>
  <Application>net.rim.blackberry.lang.zh_CN.rendering</Application>

    您也可以通过加载cod文件的方式使模拟器支持简体中文,cod文件可以再BlackBerry Device Software里面找到。

你可能感兴趣的:(JavaScript,java,.net,xml,BlackBerry)