5 Replies Latest reply on Feb 28, 2012 2:05 AM by nam1490


    nam1490 Level 1

      I am trying to localize my application.i have used flex 3.4 and my application is air.and i am unable to use localization.can any any one tell me what i am missing in the following code?



      my property file is---



      submit_button=Submit Form


      street_address=Street Address



      and my actionscript file is--

      <?xml version="1.0"?>

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">





                                    import mx.controls.Alert;

                                    import mx.resources.ResourceBundle;





                          <mx:FormItem label="{resourceManager.getString('RegistrationForm','registration_title')}">



                          <mx:FormItem label="{resourceManager.getString('RegistrationForm','submit_button')}">



                          <mx:FormItem label="{resourceManager.getString('RegistrationForm','personname')}">



                                    <mx:FormItem label="{resourceManager.getString('RegistrationForm','street_address')}">



                                              <mx:FormItem label="{resourceManager.getString('RegistrationForm','city')}">






      Also i have set additional compiler argument as  -locale=en_US;

      please suggest any way.

      thanx in advance.

        • 1. Re: Localization
          GordonSmith Level 4

          Inside <mx:Application>, add






          This tells the compiler that your application class uses a resource bundle named RegistrationForm. Without this metadata, the compiler won't understand that it also needs to compile your RegistrationForm.properties file. It's not smart enough to figure this out by looking at parameters of ResourceManager methods inside databinding expressions.


          Gordon Smith, Adobe

          • 2. Re: Localization
            nam1490 Level 1

            hi gordon ,

            if i add this mx:Metadata in application then the error occur like--

            Unable to resolve resource bundle "RegistrationForm" for locale "en_US".

            then what is the solution for that?

            • 3. Re: Localization
              nam1490 Level 1

              Also i am getting this error in case while compiling resource, by using command-

              mxmlc -locale=en_US -source-path=c:\myapp\locale -allow-source-path-overlap=true c:\myapp\TestLocalization.mxml

              please somebody suggest what i am doing wrorg.

              • 4. Re: Localization
                GordonSmith Level 4

                Assuming that the source directory for your .mxml, .as, and .css files is C:\myapp\src and the en_US version of RegistrationForm.properties is in the directory C:\myapp\locale\en_US, then you should be specifying -source-path=C:\myapp\src,C:\myapp\locale\{locale}. And there should be no need to specify -allow-source-path-overlap=true; in general, you should avoid overlapping source paths.


                Gordon Smith, Adobe

                1 person found this helpful
                • 5. Re: Localization
                  nam1490 Level 1

                  thanx a lot.