I'm working on a flex 3 application which will initially support only one language (which is not English) but may need to support English and other languages later. So I'm using the standard localization technique, with resource bundles. Now, somewhere I use the validators like EmailValidator which have some error messages displayed, these are in english and come with the flex sdk. How do I localize those messages?
Since I've found an answer to this I'll post it here in case no one comes up with a better solution. This blog post describes how the flex framework resource bundles can be localized. In short:
- Copy the english resource bundles and rename the directory to the locale you need
- Compile them to swc
The problem I have with this is I have to keep 2 source trees for the same project, one for the project and another one for the resource bundles.
I'm leaving the question open in case anyone else has a better solution.
UPDATE: Turns out you can just copy the validators.properties file from the english locale of the flex framework into your project in the same folder your other locale properties are and just translate it there. This will override the properties from the framework locale.
how can you place the validators.properties in you project? can you tell me? Thanks in advance.