Say you want your OpenLayers based map viewer from English to Spanish. The
first step is:


OpenLayers.Lang.setCode('es');


To get the translation of 'Base layer' to Spanish:


var translatedString = OpenLayers.i18n('Base layer');


To show the translated string in the layer switcher:


var layerSwitcher = new OpenLayers.Control.LayerSwitcher({'title':
translatedString});

map.addControl(layerSwitcher);


-----
Diego Alberto Arias Prado

personal blog at  http://ariasprado.name/ http://ariasprado.name/ 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Localization-tp5639893p5640555.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to