Having just gone through far too many hoops to get a the flex framework localized I thought I’d share a few notes here.

All I was trying to achieve was to ensure the Flex components (mx) adhere to a selected locale so things like date choosers and other locale-dependent components could be tailored to the users chosen language.

This is easy to do but took a long time to figure out, so for the benefit of others (and no doubt myself in the future):

Localizing the flex framework

  • Go to http://ttfx.org/Tontons_Flexeurs/BabelFlex.html and download your chosen language(s)
  • Extract the zip and copy the fr_FR (or whatever lang) to
    [your flex installation]/sdk/3.4.0/frameworks/locale/
  • Add the chosen language to your flex compiler arguments -locale=fr_FR,en_US
  • And you’re done! Setting resourceManager.localeChain = [‘fr_FR’, ‘en_US’] or whichever language you want will then change the days of week and month names etc to suit the selected language.

    For something so simple I had to do ALOT of digging, props to @fitzchev for the babelflex link.
    Apparently they are in Flex4 which is good news but Flex has been around for how long now? Part of the reason this took so long to figure out is because I refused to believe that I had to either write my own or find others’ translations for such major languages as French, Spanish, German etc.

    Before finding the BabelFlex conversions I’d also explored the process for creating my own localized framework bundles but that’s covered well in the BabelFlex readme in all of the downloads so head over there if you need to.