3 Replies Latest reply on Sep 24, 2008 8:13 PM by theLoggerGuy

    The automated racism of Flex

    theLoggerGuy Level 1
      The locale feature of Flex promises so much, but I am finding that unless your locale is en_US then you will be in pain! The copy_locale doesn't do a complete job as I have had to manually copy information about the datavisualization bundles, but I digress...

      I am trying to use the automation libraries with a locale other than en_US, namely en_GB, and my app will not compile unless the locale is set to en_US. Without the automation libraries my app will compile. I have scowered the web, but it seems that I am the only person who has ever tried automation AND localisation, however, I bet I wont be the last.

      My compiler message is as follows:
      Unable to resolve resource bundle "automation_agent" for locale "en_GB".

      My FlexBuilder compiler command line is this:
      -locale en_GB -allow-source-path-overlap=true -include-libraries "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_agent.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_dmv.swc"

      If anyone has the slightest inclining of what is going wrong (I'm talking to you Mr/Ms. Adobe) then please don't hesitate to post.

      Thanks.
        • 2. The automated racism of Flex
          boulder_lingie Level 1
          It looks like the locales directory is missing on your command line. I use something like this:
          -locale=en_US,zh_CN -source-path ../locale/{locale}
          There are a few good places to look for help on localization, namely:

          http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization

          http://sujitreddyg.wordpress.com/2008/01/22/localizing-flex-applications/

          http://livedocs.adobe.com/flex/3/html/l10n_1.html

          I agree, though, it isn't obvious how to use the localization features, and I've read and reread the two Adobe docs a bunch of times!
          • 3. Re: The automated racism of Flex
            theLoggerGuy Level 1
            Thanks boulder_lingie for your reply. I actually have a ...\{locale} in the Builder's source path, but your reply got me thinking and I finally have the it. This solution assumes that you have done a copy_locale en_US en_GB.

            Adding the test framework (automation using RIATest) to a multilingual Flex project:

            1. Create a blank file in "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\projects\automation\bundles\en_US\src" called automation_agent.properties.

            2. Duplicate this file for any other language under the "...\bundles\" folder (eg., ...\bundles\en_GB\src).

            3. Menu: Project > Properties > Flex Build Path > Source Path

            4. Button: Add Folder...

            5. Add path: "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\projects\automation\bundles\{locale}\src".

            6. Menu: Flex Compiler > Aditional comiler arguements.

            7. Replace options with -locale=en_GB -allow-source-path-overlap=true -include-libraries "C:\Program Files\RIATest\agent\RIATestAgent.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_agent.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_dmv.swc".

            8. Ok.

            This should get rid of the Unable to resolve resource bundle "automation_agent" for locale "en_GB" error. I can't garuantee that the automation_agent.properties file created wont have some side effect, but as it isn't released with the SDK I can only assume that it is not important that it's empty.