A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to implement Localization in FLEX

  1. #1
    Senior Member
    Join Date
    Jun 2009

    Thumbs up How to implement Localization in FLEX

    Hello Friends,

    How to achieve Flex Localization !! In my current project other than English, I need to change the language to French/Spanish also.

    I am using FB 4.0 and it integrated with Java/Jsp/xml. There is lot of integration in almost all modules. Here the requirement was, i want to display a comboBox with French/Spanish options. Now based on the selection whole application language has to change ie either French/Spanish.

    I dont have any idea about this ie how to achieve. Can any one provide me some sample links atleast ie how to achieve localization for flex application.

    waiting for your replies.


  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Typically I will create xml documents for each language. Every translatable string used in the app will have a node by the same name in each xml. I'll then pass a language variable in some way (normally through flashvars) which will tell me which language xml to load.
    Upon loading it I populate a static class or singleton with the xml values.

    The rest of the app will then dynamically populate its textfields, drop downs, labels etc from that singleton.

    If you're going to provide a dropdown for changing languages, you're going to want to load all language docs and have central variable that points to the currently selected one. Also every view is going to need a redraw method so that they can re-populate themselves when there is a switch.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center