german locale "de_DE"

in

actually this will work for all locales  in bundles/* (click the repo link to see)
just make sure you change every occurance of the locale (marked red) in the compiling command!

get the locales .properties files

cd /flex_sdk_3.3.0.4852/frameworks/projects/framework
rm -rf bundles/*
svn co http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/pro...

compile the locale

cd /flex_sdk_3.3.0.4852
mkdir frameworks/locale/de_DE
bin/compc -locale=de_DE  \
-source-path+=frameworks/projects/framework/bundles/de_DE/  \
-include-resource-bundles=collections,containers,controls,core,effects,formatters,logging,SharedResources,skins,states,styles,utils,validators \
-output=frameworks/locale/de_DE/framework_rb.swc

use the locale

for a single locale: just use the compiler-flag -locale=de_DE

for multiple multiple locales: -locale=en_US,de_DE,it_IT,fr_FR,es_ES

language selection combobox:

<mx:ComboBox initialize="onComboInit(event)" close="onComboClose(event)"/>
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.events.DropdownEvent;
private function onComboInit(event:FlexEvent):void {
   var combo:ComboBox = event.target as ComboBox;
   combo.dataProvider = resourceManager.getLocales();
   combo.selectedIndex = resourceManager.getLocales().indexOf( resourceManager.localeChain[0] );
}
private function onComboClose(event:DropdownEvent):void {
   var combo:ComboBox = event.target as ComboBox;
   resourceManager.localeChain = [combo.selectedLabel];
}
]]>
</mx:Script>
AttachmentSize
LocaleTest.zip1.93 KB

use the source Luke

thanks to Peter 'Kawa San' for pointing me to the bundles in the Adobe SVN repo!