You’re using approach 1 from Manish’s blog (http://manish.revise.org/2005/04/resource-bundles-in-flex.html).  I would look into using approach 2 or approach 3 for your problem.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of nithya karthik
Sent: Monday, June 27, 2005 10:13 PM
To: flexcoders
Subject: [flexcoders] globalisation in flex..

 

hai,

    I had posted a question regarding multilanguage usage in flex and manish had sent me a link.. The code of the link is as follows:

 

MXML:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
   <!--<mx:Script source="resource_bundle.as" />-->
   <mx:Script source="resource_bundle_fr_FR.as" />
      <mx:FormItem label="{txName}">
      <mx:TextInput />
    </mx:FormItem>
    <mx:FormItem label="{txAddress}">
      <mx:TextArea />
    </mx:FormItem>
    <mx:FormItem label="{txPhoneNumber}">
      <mx:TextInput />
    </mx:FormItem>
    <mx:FormItem>
      <mx:Button label="{txSend}" />
    </mx:FormItem>
  </mx:Form>
</mx:Application>

 

resource_bundle.as:

 

var txName = "Name"
var txAddress = "Address"
var txPhoneNumber = "Phone Number"
var txSend = "Send"

 

resource_bundle_fr_FR.as:


var txName = "Nom"
var txAddress = "Adresse"
var txPhoneNumber = "Numéro De Téléphone"
var txSend = "Envoyez"

 

 

What I need from this is, say i have 2 buttons in the mxml application namely 'English'  and 'French'.. when i click the english button the form labels should display the english text and when i click on the french button the form lebels should display the french text.. How to accomplish this? please help with the code..  

 

Thanks,

Nithya

Send instant messages to your online friends http://uk.messenger.yahoo.com

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to