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

I have a basic tile server running using the openstreetmap-carto style configured according to the tutorial on switch2osm. I was wondering is there a way to edit the style file so that english characters are used for all places in the world as opposed to each country's localized alphabet? Thanks in advance for any help.

asked 04 Oct '18, 23:59

coderunner's gravatar image

coderunner
416610
accept rate: 0%


Hi,

You can look at this internationalization kit for OSM Carto:

https://github.com/giggls/osml10n

The German fork offers it in a full form here:

https://github.com/giggls/openstreetmap-carto-de/tree/upstream+l10n

and here's how does it look like:

https://tile.iosb.fraunhofer.de//#map=5/30.1198/33.2703/3

alt text

permanent link

answered 05 Oct '18, 00:44

kocio's gravatar image

kocio
2.1k12341
accept rate: 20%

edited 05 Oct '18, 01:01

2

This is the best solution. A more primitive approach is to simply replace queries for the "name" column with COALESCE(tags->'name:en', tags->'int_name', name) AS name which will then replace the local name with the name:en or int_name where these are set. Note that this, like the above osml10n solution, depends on having imported with --hstore, otherwise these names would not even be there.

(05 Oct '18, 07:56) Frederik Ramm ♦

Another option, that requires minimal changes to the map style, is using database views that incorporate the aforementioned COLAESCE statement, i.e. the view looks exactly like e.g. planet_osm_point only that its name column has a different content.

(05 Oct '18, 07:57) Frederik Ramm ♦

Awesome thanks! That looks exactly like what I need.

I was looking into how it works a little bit, and I compared it with the master branch here: https://github.com/gravitystorm/openstreetmap-carto/compare/master...giggls:upstream+l10n

There's a lot of references to localized_name_second but don't see it defined anywhere. Is that a field that exists in the planet.osm file?

(05 Oct '18, 20:49) coderunner

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:

×65
×24
×22

question asked: 04 Oct '18, 23:59

question was seen: 3,506 times

last updated: 05 Oct '18, 20:49

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