NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have tried to change the language of my map from hebrew to english. can someone help?

<html>
  <head>
    <title>OpenLayers Demo</title>
    <style type="text/css">
      html, body, #basicMap {
          width: 100%;
          height: 100%;
          margin: 0;
      }
    </style>
    <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
    <script>
      function init() {
        OpenLayers.Lang.setCode("en");
        map = new OpenLayers.Map("basicMap",{ controls: [] });

        map.addControl(new OpenLayers.Control.PanZoomBar());
        map.addControl(new OpenLayers.Control.LayerSwitcher());

        var wms = new OpenLayers.Layer.OSM();

        map.addLayer(wms);
        map.setCenter(new OpenLayers.LonLat(34.78049,32.08012).transform(
            new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
            new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
          ), 15);

      }
    </script>
  </head>
  <body onload="init();">
    <div id="basicMap"></div>
  </body>
</html>

asked 15 Dec '10, 23:05

loren2978's gravatar image

loren2978
0111
accept rate: 0%

edited 16 Dec '10, 15:25

TomH's gravatar image

TomH ♦♦
3.3k83943


If you mean that you want the names on the map to appear in a different language then the answer is that you can't if you're using our tiles (which the OpenLayers OSM layer does) as we only render one set of tiles and the names are part of the tile images.

So you would need to render your own tiles, or find somebody that has rendered some in the language you want and is prepared to let you use them, and then configure OpenLayers to display them.

permanent link

answered 16 Dec '10, 15:24

TomH's gravatar image

TomH ♦♦
3.3k83943
accept rate: 20%

-1

I see that the question of what language to display labels in a map has been asked before ;-)

I understand that OSM wants to be useful and usable to the natives of a country and so OSM displays labels in that country's language. Unfortunately, the consequence is that OSM maps are at best of limited use to non-native users. I, for instance, would need to know to read Thai in order to use a Thai map and that's not going to happen. For me, OSM is only useful to if a country's labels are in Latin script.

Apparently, OSM uses tiles and the language used in a tile is fixed. That has been the answer given over the years to why OSM cannot display tiles in other than the native language. OK, but why can't there be multiple tiles with the one chosen based on language preference?

permanent link
This answer is marked "community wiki".

answered 06 Mar '22, 19:30

vgivanovic's gravatar image

vgivanovic
1
accept rate: 0%

@vgivanovic: I wrote about that just a few days ago, see answer here: https://help.openstreetmap.org/questions/83654/french-cities-names-on-maps/83659

If you need latin-script world-maps, have a look at https://wiki.openstreetmap.org/wiki/osMap where you'll find ten different versions (Danish, Dutch, Czech, English, French, German, Italian, Polish, Portuguese and Spanish).

(06 Mar '22, 19:35) Spiekerooger
-5

There used to be maps in many languages on http://cassini.toolserver.org/tile-browse/ - Does anybody know what has happened to them?

permanent link

answered 07 Jan '11, 14:45

Kartograefin's gravatar image

Kartograefin
592178
accept rate: 0%

1

This isn't answer to the original question, it's a new question.

(07 Jan '11, 14:56) TomH ♦♦
1

They have moved to http://toolserver.org/~osm/locale/

I am not sure though what their (wikimedia's) tile usage policy is with respect to using in external projects, and if their english tiles ( http://toolserver.org/~osm/locale/en.html ) could be used in the case of this question

(09 Jan '11, 12:56) apmon

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×122
×72
×1

question asked: 15 Dec '10, 23:05

question was seen: 22,571 times

last updated: 06 Mar '22, 20:10

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum