On Sun, 12 Dec 2010 19:07:17 ce-test, qualified testing bv - Gert Gremmen 
wrote:
> How can we show on OSM.org
>  the English street names in regions that allow
> for local names in Arabic and Hebrew ?
>
> See for example here:
> http://www.openstreetmap.org/?lat=32.52074&lon=34.95048&zoom=16&layers=M
>
> where Hebrew names are shown, and where some streets have EN versions,
> but are not displayed even when the Hebrew name is absent.
>
> I saw some discussion about it, but could not understand how to fix it
> in
> my situation.
>>
> Shouldn't the names be browser country dependent ?  I understand that
> this
>
> requires separate layers for names and tiles, and I am surprised
>
> no-one ever thought of implementing that.

Take a look at this:

http://toolserver.org/~osm/locale/

Here's how it works: it makes separate layers for names and tiles...

Basically, as I understand it, the background has streets and things rendered 
on it, but no text.  Then there are 'label layers' (see the + menu on the 
right) for each language.  For every object rendered on the background the 
label layer renders the text for that object for a single language.  To 
render the text the software finds name:<lang>=* tag and renders it.  If no 
string is found for name:<lang>=* the software renders name=*

Currently the OSM Mapnik layer (and Osmarender) render only the name=* tag if 
present.  So, the problem you see (some streets blank even if name:en=* is 
present) is due to name=* not being present.

The toolserver.org link I gave is an experiment, but I think it is the right 
answer.

It means that the 'name' tags are best interpreted like this:

name=*  The 'default' text to render if no language is requested, or if there 
is no name:<lang>=* tag for the requested language.

name:<lang>=*  The text to render if language <lang> is requested.

In many cases name=* will be the same as name:<local_language>=*.  You could 
duplicate the entries, and I think it's okay to have that sort of redundancy 
in the database (especially as it can be automated), but it's not actually 
required.  As an example (choosing a street near the point you gave):
http://www.openstreetmap.org/browse/way/75720915

You could add name:he=* and make it the same as name=*.  But, if I request 
language 'he' I will get name=* anyway because name:he=* is not present.

This one does not show a name in the OSM Mapnik layer because there is no 
name=* tag:
http://www.openstreetmap.org/browse/way/88075816

So add name=* the same as name:en=*

In this case, if I request any language except 'en' I get nothing, because 
there is no name=* tag.  (And with the OSM Mapnik layer I can't request a 
language anyway).

One disadvantage of defaulting to name=* is that there is no way of knowing 
what language it actually is.

Does that help?

Best wishes,

Andrew

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to