
While implementing Flex ResourceBundle using .properties files, I ran into a strange problem. Although my Locale folder was added to the build path, Flex could not find it and could not resolve the ResourceBundles. I Googled things up and found the problem, it looks like a Flex 3 issue...
Instead of specifying the locale folder in the build path (which sounds like the correct way to do it), add it to the "Additional compiler arguments" in the project's compiler tab.
To do this, simply right click your project > properites > Flex compiler and add "-source-path ../locale/{locale}" to the Aditional compiler arguments text field.
(note that my locale folder is under

Once your done you'll be able to use this very powerful feature.
Note that in case you are using Ant you would also need to add the locale folder location as source-path path-element to the
<mxmlc>
.
<source-path path-element="locale/{locale}"/>
.
</mxmlc>

11 comments:
Thanks man
thank you ... you saved us from hours of pain...
thanks a lot
Thanks a lot!!!
Hi,
Thank-you! But...
You've solved one (actually a number) of problems with setting up an inherited project from another developer, but I have another one.
I have installed SDK 4.0 onto Flex 3 and (despite all the files being there, apparently) I can't reference or use any of the mx: namespace.
I'm guessing it is a very similar cause and thought you might have an idea?
Thanks,
G
Thank you SOOOO much, you spared me hours of looking for such solution.
Solved my error but now I'm getting the warning:
'C:\Documents and Settings\bhl\Adobe Flash Builder 4\SagphApplications\src\locale\en_US', is a subdirectory of source path entry, 'C:\Documents and Settings\bhl\Adobe Flash Builder 4\SagphApplications\src'
is this anything to worry about?
@Anviliis try to add this to your compiler arguments: -allow-source-path-overlap=true
Thanks a lot! Or "Danke" as we say here ... ;-)
Thanks a lot! i was struggling with compiling swf with resource bundle for flex monkey.
It is helped me lot.
Thanks
Kavi
How would you do this as an mxmlc argument?
Post a Comment