[mapguide-users] Changing the status bar unit spelling

Jackie Ng jumpinjackie at gmail.com
Mon Dec 14 07:07:37 EST 2009


I was just following the trail of source code and it originates all the way
back to the coordinate system of the map. At mapframe.php line 97:

        if($srs != "")
        {
            $csFactory = new MgCoordinateSystemFactory();
            $cs = $csFactory->Create($srs);
            $metersPerUnit = $cs->ConvertCoordinateSystemUnitsToMeters(1.0);
            $unitsType = $cs->GetUnits();
        }
        else
        {
            $metersPerUnit = 1.0;
            $unitsType = GetLocalizedString("DISTANCEMETERS", $locale);
        }

$cs is an instance of MgCoordinateSystem

$unitsType is the value that gets written to the ajaxmappanel.templ template
and what the status bar uses to write the current position.

The localized value DISTANCEMETERS defaults to "Meters" in localized\en.
Since your one is in upper case it must have come from the coordinate system
definition.

So the culprit would seem to be the coordinate system of your map.

- Jackie


Jo Cook wrote:
> 
> Hi Jackie,
> 
> That allows me to change the strings in the viewer options in the task
> bar, but not the bottom status bar, as far as I can see- unless I'm
> missing something obvious!
> 
> Thanks
> 
> Jo
> 
> Jackie Ng wrote:
>> 
>> Hi Jo,
>> 
>> All localisable UI text strings should be originating from the
>> localized\en file
>> 
>> - Jackie
>> 
>> 
>> Jo Cook wrote:
>>> 
>>> Dear All,
>>> 
>>> Is it possible to change the spelling of "METER" in the ajax viewer
>>> status bar to the british "Metre(s)"? I have looked in the template
>>> files but can't seem to find where it's defined- only where to change it
>>> to Miles.
>>> This is with Mapguide Open Source 2.1.
>>> 
>>> Thanks
>>> 
>>> Jo
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Changing-the-status-bar-unit-spelling-tp4163318p4163728.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list