[mapguide-users] Localizing menus and toolbar

Kenneth, GEOGRAF A/S ks at geograf.dk
Wed Apr 2 04:08:34 EDT 2008


Yes, that is what I am talking about.
I have not used WebLayouts, as the viewer is very cumbersome to tweak 
beyond the settings avalible in the WebLayout setup.
You can do it runtime, on the actual layout, instead of using the 
template approach.
The placeholders would then be the English  words.

I have built an API that allows typed access to the WebLayout, which 
will make this task easy:

WebLayout layout = con.GetWebLayout(...);
foreach(UIItemType button in layout.ContextMenu.MenuItem)
    if (button as CommandItemType != null)
       (button as CommandItemType).Command = TranslateString((button as 
CommandItemType).Command);
con.SaveResource(layout);

The API is for .Net only.
http://code.google.com/p/mapstudioos/wiki/HowToUseMapGuideAPI


Regards, Kenneth, GEOGRAF A/S



Jim O'Leary skrev:
> Kenneth
>
> Are you talking about dynamically generating a web layout by opening a  web
> layout XML file with placeholdrs in it, interpolating the strings for the
> given language, and writing it to the session repository? Have you done any
> work on this?
>
> Thanks
>
>
>
> Kenneth, GEOGRAF A/S wrote:
>   
>> Ok.
>> I guess it would be simple to write a small app that loads the weblayot 
>> xml, translates the fields, and writes it into the session repository.
>>
>> Thanks for you reply.
>>
>> Regards, Kenneth, GEOGRAF A/S
>>
>>
>>
>> Chris Claydon wrote:
>>     
>>> Unfortunately there's no way to do this yet. You'll need to create a
>>> copy of your weblayout, and localize the strings it contains.
>>>
>>> Chris.
>>>
>>> -----Original Message-----
>>> From: mapguide-users-bounces at lists.osgeo.org
>>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Kenneth,
>>> GEOGRAF A/S
>>> Sent: May 25, 2007 5:53 AM
>>> To: MapGuide Users Mail List
>>> Subject: [mapguide-users] Localizing menus and toolbar
>>>
>>> Is there a way to localize the toolbar and menu's?
>>>
>>> The current localizations work fine (except for the API default locale 
>>> problem), but only allows localization of "MapGuide" items, and not the 
>>> userdefined items. I would like to use a similar approach for having 
>>> multiple languages for the same WebLayout.
>>>
>>>   
>>>       
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>     
>
>
> -----
> Jim O’Leary
>
>
> Technical
> Consultant
>
>
> Pacific Alliance
> Technologies
>
> 2nd Floor, 24 East 4th Ave, Vancouver
>  BC, Canada
> V5T1E8
>
> TEL 604.676.6000 TOL 877.691.9171 FAX 604.682.0962 
>
>
> WEB  http://www.pat.ca/ www.pat.ca 
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080402/97f44eae/attachment.html


More information about the mapguide-users mailing list