Jakob Külzer Ninja Coding Monkey goes Canada

13May/09Off

Flex Builder and Locales relative to the Workspace

For the project I'm working on right now we are using Flex' localization mechanism. To do so, you need to specify the location of the .properties file in the .actionScriptProperties file, either by editing the file directly or using the project properties dialog. Problem is that this path needs to be absolute. Putting in /Users/jakob/work/.../project-dir/src/main/flex/locales/{locale} is a bad idea. Fortunately Flex Builder is built on eclipse so you can use Eclipse's Linked Resources. Per default a variable called DOCUMENTS is defined and points to the current workspace:

picture-2

So with that in mind you can easily reference paths relative to your workspace:

${DOCUMENTS}/project-dir/src/main/flex/locales/{locale}