0 Replies Latest reply on Dec 31, 2007 5:39 AM by Jens Eckervogt

    Problem with Resource.bundle and MenuBar Component

    Jens Eckervogt Level 1
      Hello guys,

      I wish to know that resource.bundle once MenuItem. If i change my correct Language German.

      But it can't work locale on the MenuItems. Why? I believe, that you Adobe Inc will to joke or not?? :(
      I do not understand.
      Sample : I have written this code:
      with m@Resourcent like Panel:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="480" height="74" cornerRadius="5" borderStyle="solid" backgroundColor="#E7E7E7" alpha="1.0" backgroundAlpha="0.5"

      import mx.events.MenuEvent;
      import mx.collections.*;

      public var menuBarCollection:XMLListCollection;

      private var menubarXML:XMLList =
      <menuitem label="APP_PROGRAM" >
      <menuitem label="APP_DRAG" />
      <menuitem label="APP_EXIT" />

      private function initCollections():void {
      menuBarCollection = new XMLListCollection(menubarXML);

      private function menuHandler(event:MenuEvent):void {

      <mx:MenuBar left="5" right="5" height="28" bottom="5" labelField="@Resource(bundle='myResources', key='@label')" itemClick="menuHandler(event);"
      dataProvider="{menuBarCollection}, @Resource" showRoot="true" fontSize="14"/>
      <mx:HBox left="5" top="5" right="5" verticalAlign="middle" horizontalAlign="left" paddingLeft="2" paddingRight="2" height="25">
      <mx:Spacer width="100%"/>
      <mx:Label text="@Resource(bundle='myResources', key='APP_TITLE')" fontSize="12" fontWeight="bold"/>
      <mx:Spacer width="100%"/>
      <mx:Button width="24"/>
      <mx:TextInput height="22"/>


      And I have been created that file myResource.properties:

      APP_TITLE=Flex Glade Application - English
      APP_DRAG=Drag this

      I have been worked this complice with -locale en_US -source-path=../locale/locale)

      But i do not know that Menu-Root has problem? Please answer, if you know that Problem.

      Thanks bye SnakeMedia