Localization of controls/sidebar

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Localization of controls/sidebar

Vlatko Kosturjak-2
Hello!

Is there any way to put own labels on sidebar (like Search button,
etc) or on zoom control where english words are written (building,
neighborhood, ...). As I'm using map for local use, it would be good
to have that translated. Any good way of doing it?

Thanks in advance,
--
Vlatko Kosturjak, Kost                 ICQ: 3631122
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Localization of controls/sidebar

Vladimir Agafonkin
Hi Vlatko,

You can localize the zoom control like this:

var control = new CM.LargeMapControl();
control.zoomLabelConfig = {
    17: "Building",
    13: "Neighborhood",
    9: "County",
    5: "Country",
    1: "Region"
};
map.addControl(control);

Regarding sidebar, there's currently no straight way to do it but you can do text replacements with JavaScript after the control was initialized through class name hooks (i.e. find the element that contains the text and do innerHTML replacement).

On Sat, Jun 5, 2010 at 8:41 AM, Vlatko Kosturjak <[hidden email]> wrote:
Hello!

Is there any way to put own labels on sidebar (like Search button,
etc) or on zoom control where english words are written (building,
neighborhood, ...). As I'm using map for local use, it would be good
to have that translated. Any good way of doing it?

Thanks in advance,
--
Vlatko Kosturjak, Kost                 ICQ: 3631122
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev



--
Vladimir Agafonkin
Front-End Architect, CloudMade
+380 93 745 44 61

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Loading...