Ok I followed my own advice and started over and after a
little bit of tweaking I got it working. Here's how.
To create a working flex app hosted on fds2 we'll use the
existing samples folder:
Step 1. Set the locale and add the path
In samples/web-inf/flex/flex-config.xml uncomment out the
locale parameter:
<!-- Specifies the locale for internationalization.
-->
<!-- not set -->
<!-- -->
<locale>en_US</locale>
and under source-path specify location of locale files:
<source-path>
<path-element>../../LocalApp/locale/{locale}</path-element>
</source-path>
Ste 2. Create the sample app
Create folder under samples called LocalApp
In here create a file called Myapp.mxml which contains the
following code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"layout="absolute">
<mx:Label text="@Resource(key='hello',
bundle='Myapp')"/>
</mx:Application>
Step 3. Create the locale resource files
Create a folder in LocalApp folder called locale
In the locale folder create 2 folders called en_US and fr_FR
In each of these folders create a file called
Myapp.properties
In each of these files add the line: hello=Hello WOrld! and
hello=Salut le Monde (respectively)
step 4. Run the app
Make sure fds is running
Open browser and enter the address:
http://localhost:8700/samples/LocalApp/Myapp.mxml?recompile=true recompile=true is important if you want to change the
flex-config.xml locale to fr_FR or
modify the resource string files.
Default behavior seems to be some serious caching which even
a fds restart won't fix.
Step 5. Change locale, refresh browser
Open flex-config.xml and change the local parameter to fr_FR
Save, then refresh browser.