how to resourcebundle intelliJ 12 Flex

Hi there,

how can I use resourceBundle in FlexMobile project, intelliJ 12.
I got this error message when I try to compile the project

unable to open 'locale=en_US'

thanks

16 comments

Can you please attach *.iml file (settings for your Flash module are stored there)?

0

The main problem is that you forgot '-' sign before '-locale' option in the Additional Compiler option field at Compiler Options tab of the build configuration. But in fact you do not need to set locales here (details below).

Second critical error is that you have configured 'locale' folder as a source folder and also as a library and library doc URL. It is not a source folder and not a library. Instead you need to mark all subfolders of 'locale' folder as source folders (i.e. en_US and may be others).

And several advices how to improve project setup:

  • instead of setting '-locale=en_US' as Additional Compiler Options you'd better set it in the table above at this Compiler Options tab. By the way 'en_US' is already used by default there.
  • you shouldn't setup source paths as Additional compiler options (-source-path=locale/{locale}). Remove this option and mark all subfolders of 'locale' folder as source folders ans I already mentioned above. IntelliJ IDEA will use {locale} token automatically if you setup locale source folders and locales correctly.
  • actually you may leave Additional compiler options empty, even '-allow-source-path-overlap=true' is not neede there.
  • it's a bad idea to keep AIR descriptor templates in the output folder (out/description/ToddlerTales-...-descriptor.xml). Instead you'd better place them in the module content root (at the same level where src and locale folders are located). Descriptors are copied to the output folder automatically when you compile or run/debug.


I can check your project again if you attach updated *.iml file.

0

Thanks for your answare,
I think setup everything, but now I got this error.



Attachment(s):
Screen Shot 2013-10-18 at 18.43.03.png
ToddlerTales.iml.zip
0

Please read carefully.

Instead you need to mark all subfolders of 'locale' folder as source folders (i.e. en_US and may be others).
0

Also I suggest to move ToddlerTales-...-descriptor.xml files one level up, so that they are not in a source root.

0

:)

Ohhh thanks a lot, now its work's perfectly ;)



Attachment(s):
Screen Shot 2013-10-18 at 18.52.30.png
0

I can't say if application-level libraries are configured correctly (GotoCore, starling and others) because they are stored in a different file. You may check libraries configuration yourself after reading tutorial. Or attach screenshots if you want me to check.

0

I guess you know how to enable fr_FR and hu_HU locales support?

0

think I know, but thank you if you can describe the workflow for me.

0

Hi Alexander,

thanks again the help, now it's work perfect in Flex.
Can you help me how can I make this in pureAS?
I create another build configuration to the project (PureAS), but when build, I got the following error:

[ToddlerTales-PureAS - Main (module ToddlerTales)]: Unable to resolve resource bundle 'opening'

thanks



Attachment(s):
ToddlerTales.iml.zip
MainFlex.mxml.zip
Main.as.zip
0

Project is configured correctly. You can select which build configuration to use for source code highlighting (Flex or pure AS) in the status bar.

ActionScript Compiler 2.0 that is used by default for pure AS build configurations doesn't support i18n. You need to uncheck 'Prefer ASC 2.0' at Settings | Compiler | Flex Compiler. Both Flex and pure AS build configurations will be compiled with Flex compiler.

0

Please sign in to leave a comment.