5 Replies Latest reply on Jul 17, 2008 6:22 PM by theLoggerGuy

    Localisation error getting me down

    theLoggerGuy
      Hello all,

      I am attempting to add localisation to my Flex app. After following the Flex help I am confronted with the error message: Unable to resolve resource bundle "datamanagement" for locale "en_GB". Does anyone know what this message is about?

      Background:
      I have run the "copylocale en_US en_GB" command successfully.
      I have created a folder \src\locale\en_GB, added a file called mainapp.properties and populated it with name/value pairs.
      Next I added the resource bundle to my application using the meta tag [ResourceBundle( "mainapp.properties" )
      I added -locale en_GB -allow-source-path-overlap=true to the compiler options of Flex builder.
      I added src/locale/{locale} to my project's source path.


      Any help in this area would be greatly appreciated.
        • 1. Re: Localisation error getting me down
          Gregory Lafrance Level 6
          Is datamanagement one of your RB?

          Have you created a locale sub-folder in your project main folder, the one with the main app mxml?

          Is there a sub-folder in the locale folder en_BG?

          Do you have this in your Flex project compiler options -locale en_US?

          Please post simplified yet "complete" code so we can see how you are dealing with your RB in code.
          • 2. Re: Localisation error getting me down
            cheftimo Level 2
            In addition to what Greg is telling you to check, make sure you have framework resources for 'en_BG'.

            If you are not familiar with the above, this would be a good thing to read: http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization#Hu h.3F_French_framework_resources.3F.

            Carlos
            • 3. Re: Localisation error getting me down
              theLoggerGuy Level 1
              Greg,

              thanks for the reply. The adobe forum has obfuscated most of the information you've asked which was present in my first post - tip don't use the "bullet" tags in this forum. The section labelled "Background" is as follows:
              I have run the "copylocale en_US en_GB" command successfully.
              I have created a folder src/view/locale/en_GB, added a file called MyBox.properties and populated it with name/value pairs.
              Next I added the resource bundle to my application using the meta tag [ResourceBundle( "MyBox.properties" )
              I added -locale=en_GB -allow-source-path-overlap=true to the compiler options of Flex builder.
              I added src/view/locale/{locale} to my project's source path.

              Additional to that information, no "datamanagement" is not present anywhere in my code. Nor is there a datamanagement.properties file.

              I removed -locale=en_US and replaced it with -locale=en_GB

              Please notice that I have an <mx:AdvancedDataGrid/> in my sample code. If commented then the compilation works fine, but if I uncomment it then I get my error message. I get the same result if I use a chart.

              Code shown below:

              • 4. Re: Localisation error getting me down
                Gregory Lafrance Level 6
                This is one of the things I don't like about Flex. Ya gotta jump through hoops to create international apps. I get many errors unless I put all the framework resource bundles in my project. datamanagement is here:

                C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\fbpro\projects\datavisualization\bundles\en_US
                • 5. Re: Localisation error getting me down
                  theLoggerGuy Level 1
                  Thanks Greg. That did the trick.

                  For everyone else:
                  Copy the folder C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\fbpro\projects\datavisualization\bundles\en_US to C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\fbpro\projects\datavisualization\bundles\en_GB. (Perhaps not necessary, but makes it consistent.)

                  Add C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\fbpro\projects\datavisualization\bundles\{locale} as a source path in the builder.

                  Compiler error vanishes and app runs as expected.