Flex framework component localization
Published on March 7th, 2010 by DannyT. Filed under FlexHaving 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.
WHY ARE THESE NOT IN THE SDK BY DEFAULT????????!!!!!!
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.

JabbyPanda
March 7th, 2010 at 10:58 am
Gordon Smith in 2008 wrote that Adobe did not include localization of Adobe Flex SDK in other languages into ‘official’ releases, because they were not properly tested
http://old.nabble.com/Is-Flex-compiled-with-only-one-locale–td18535567.html
Although all available localized messages were always available at trunk of Adobe open-source
SVN code repository for Flex SDK here:
http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/bundles/
DannyT
March 7th, 2010 at 12:58 pm
Yes I had seen this, but they’re not provided as immediately usable swcs as per the babelflex site. So even once you’ve found those translations you’re still required to compc them into bundles which in my opinion is a terrible experience for flex developers. Particularly anyone new to the platform coming from other languages where this just isn’t an issue.
Logan
March 9th, 2010 at 7:32 pm
Just be aware, some of the BabelFlex locales are incorrectly packaged and won’t work without some manual tweaking (se_SV and a few others).
We were trying to get corrected versions of these posted on a Maven repository for Flexmojos to use, but it never quite got done.
DannyT
March 9th, 2010 at 9:21 pm
Turned out a lot of them weren’t even translated so I’ve been compiling from those available from the flex trunk here
Peter R
June 10th, 2010 at 6:10 pm
I made my own locale and used the copylocale.exe command to get the right files in there.
My issue is that in a team environment it doesn’t
make sense to have to copy these files into the framework directory of everyone’s sdk. Especially if we have a separate build server with a different OS/directory structure. Is there no way to tell Flex to look elsewhere for these localization framework files? Somewhere I can include in the svn and have deploy with the project?
DannyT
June 25th, 2010 at 12:55 pm
We’ve had the same issue, for now we’ve included the locales in svn and added a build task to copy it to the sdk, not very portable though unfortunately.