2011-11-11 4 views
0

글쎄, 난 단지 충분히 (검색하는 약 1 시간 후) 플렉스 SDK를 역 공학하는 데 하여 내 플렉스 응용 프로그램에 i18n (국제화)를 구현하고 많은 도움이 될 수 있었다 (여기서 specific question 날 도왔습니다 많이! (some updates for flex 4.5)).mx : MenuBar 국제화?

문제는 난 당신이 <mx:MenuBar>의 내용을 정의하는 방법 (AN <fx:XMLList> 안에 내 {getLand('key')} 바인드를 사용 할 수 없습니다. 나는 다음과 같은 몇 가지 예를 들어 국제화뿐만 아니라, 메뉴 바의 예를 포함 시켰습니다.

과 같이, 도구 모음의 외부의 XMLList를 넣어
<!-- Example of proper (working) i18n --> 
<s:TextArea text="{getLang('Rules')}"/> 

<!-- Problem Area (a bare bones example) --> 
<!-- Error message in IDE: Access of undefined property _application_XMLList1 --> 
<mx:MenuBar labelField="@label"> 
    <fx:XMLList> 
     <menuitem label="{getLang('File')}"/> 
    </fx:XMLList> 
</mx:MenuBar> 

답변

0

시도 :

<fx:Declarations> 
    <fx:XMLList id="_menuStuff"> 
    <menuitem label="{getLang('File')}"/> 
    </fx:XMLList> 
</fx:Declarations> 

<mx:MenuBar labelField="@label" dataProvider="{_menuStuff}"/> 

이, 행운을 작동해야

!