[fusion-users] problem with localization of fusion, i think i found a bug...

Chris Claydon chris.claydon at autodesk.com
Mon Apr 20 11:05:01 EDT 2009


If the code isn't supported by OpenLayers, it will revert to en. Is 'sv' supported by OpenLayers?

-----Original Message-----
From: fusion-users-bounces at lists.osgeo.org [mailto:fusion-users-bounces at lists.osgeo.org] On Behalf Of Måns Beckman
Sent: Friday, April 17, 2009 4:07 AM
To: fusion-users at lists.osgeo.org
Subject: [fusion-users] problem with localization of fusion, i think i found a bug...

Hi, 

Ok, I'm still no coder, but I found something that isn't working as it should. I was trying to localize fusion in MGE2010 and it wouldn't read my localization, so I did some code digging and found something strange. 

In this snippet from fusion.js something isn't working as it should.

        initializeLocale: function(locale) {
          OpenLayers.Lang.setCode(locale ? locale : window._FusionLocale);
          this.locale = OpenLayers.Lang.code;

To see what's happening in a simple way I modified it like this.

        initializeLocale: function(locale) {
alert(window._FusionLocale);
alert(locale?locale:window._FusionLocale)
OpenLayers.Lang.setCode(locale?locale:window._FusionLocale);this.locale=OpenLayers.Lang.code;
alert(OpenLayers.Lang.code)

And the result I got was in my case where I'm using a Swedish browser "sv", so window._FusionLocale is correct, "sv", so locale?locale:window._FusionLocale is reporting what I want, but then I get "en", so by some reason OpenLayers.Lang.code is reporting "en".

Anyone who can explain why, and what I need to do to get it to work? (I can think of some quick and dirty ways to fix it, but clean code is nicer.)

Cheers
Måns
_______________________________________________
fusion-users mailing list
fusion-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fusion-users


More information about the fusion-users mailing list