Now that fallback is working, we can load locales from loaderInfo for real
authorAndy Allan <gravitystorm@gmail.com>
Wed, 23 Feb 2011 10:59:04 +0000 (10:59 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 9 Mar 2011 11:01:08 +0000 (11:01 +0000)
potlatch2.mxml

index 5a5b156..74e434d 100644 (file)
 
                private function initApp():void {
 
-            /* For reasons that I don't yet understand, the en_US locale is the default and doesn't work at all. Use en_GB instead. */
-            /* Change this to another locale (e.g. fr_FR) to see the differences. This will obviously become done differently at some point. */
-            dispatchEvent(new LocaleEvent(LocaleEvent.LOAD_LOCALE,'en_GB'));
+            /* For reasons that I don't yet understand, the en_US locale is the default and doesn't work at all. */
+            /* Change this to another locale (e.g. fr_FR) to see the differences. */
+            if (loaderInfo.parameters['locale']) {
+              dispatchEvent(new LocaleEvent(LocaleEvent.LOAD_LOCALE,loaderInfo.parameters['locale']));
+            }
 
                        Globals.vars.map_area = map_area;
                        Globals.vars.root = map_area.rawChildren;                       // set up global reference to root level