0 Replies Latest reply on Oct 14, 2010 12:17 PM by Flex Explorer

    Is adding a new locale without re-compiling possible?

    Flex Explorer



      I was wondering if it is possible to add a new locale and use it within the app without re-compiling the existing swf.


      Otherwise, it will throw runtime error in truncateText() in Label.as


      Ok now that i have you attention here is the scenario.

      - We already have an existing application lets say it is called main.swf

      - We load the locales.properties file at runtime and put it in the ResourceManager. To get a better picture, we make use of bindings to our text fiels that make use of the localization. So in our login page we have a dropdown menu to change the language.

      - So far all the supported languages work fine and does not throw exceptions when running the app, as long as we included the the framework files in the compilation, namely:

           - flash-integration_rb.swc

           - datavisualization_rb.swc

           - textLayout_rb.swc

           - playerglobal_rb.swc

      - So to support the es_ES locale we replicated the one from en_US by using copyLocale.exe which was suggested in the flex docs.

      - When we tried to use the es_ES locale without including the framework files you would not go far to the app without having an exception thrown.

           - something like "runtime error in truncateText() in Label.as", etc. I have looked thru the web and there are 3 different error being thrown because of this. This is only one of them.


      Now here is the problem:

      - We would like to add a new locale without recompiling the main swf file, and use it successfully. Right now we can add the new locale and try using the app with that locale being active and used in the app. However, like i said above it wont go that far without an exception being thrown.


      My question:

      - Is there a way or an option that we could use so we dont hit this new locale exception without recompiling the main.swf file? I have read the flex docs and they would usually recommend adding the framework files first before adding the new locale. However is there away to go around this? Anybody actually bumped on to the same scenario?


      Any thought or opinions is much appreciated.


      Thanks in advance,