3 Replies Latest reply on Apr 3, 2008 9:38 AM by Gregory Lafrance

    localeChain fail in runtime


      I have a flex windows application, its a multilanguage app. The user its suppuso to select the lenguage at the runtime, when they select for firts time a lenguage everythink its change, but, if I change the language again selecting it from a combo box, Panel titles and Label text, tab's titles doesn't change. I'm using the localeChain..
      The code to change the locale its very simple:

      private function changeLocale(pLocale:String):void

      resourceManager.localeChain= [pLocale];
        • 1. Re: localeChain fail in runtime
          Gregory Lafrance Level 6
          You may need to first ensure you have the new language resources and they are done loading:

          var resourceModuleURL:String = "Resources_" + newLocale + ".swf";

          var eventDispatcher:IEventDispatcher =

          ResourceEvent.COMPLETE, resourceModule_completeHandler);

          private function resourceModule_completeHandler(event:ResourceEvent):void {
          resourceManager.localeChain = [ newLocale ];
          • 2. Re: localeChain fail in runtime
            TavoCR Level 1
            Thansk Greg Lafrance,

            I think that I need to compile the recourse file, I'm not sure how to do this, If somebody can tell me the steps to do this, I'd be so Thankful...
            • 3. Re: localeChain fail in runtime
              Gregory Lafrance Level 6
              compc -locale fr_FR -source-path locale/{locale} -include-resource-bundles HelloWorld -output locale/fr_FR/HelloWorld.swc

              Then make sure your resource bundle named HelloWorld.properties is in the locale/fr_FR folder.