Tuesday, September 26, 2006

ResourceBundle files in localized Flex apps

Problem: You are creating a flex app in flexbuilder that will be available in two languages, English and French.

You create the following:
\locale\en_US\Flexapp.properties
\locale\fr_FR\Flexapp.properties

You throw a string in each:
after=after
after=après

You compile the application and it defaults to english and comes up fine
You change the compiler arguments in project properties to -locale fr_FR and run it and instead of an è you get either a blank or a square

Solution: The text encoding type of the Flexapp.properties file in flexbuilder defaults to ISO-8859-I. Cut out all the text in the file, save it. Go to the properites of the file and change the encoding to UTF-8. Then paste your text back in and save. Now when you compile and run the letters should come up fine.

3 comments:

Anonymous said...

Thanks Vic. That was exactly the problem I was having.

Pedro Sena said...

Vic, I'm having the same problem, but with latin words, like: José.
If the compiler default is ISO-8859-1 I suppose that should not occur, right?
I searched for this file but did not find it, where is it exactly ?
Thanks

Ami said...

Thanks Vic, this solved my problem! Thanks again...

Cheers!
Ami