[OSM-dev] Need advise for localization of Mapnik/Osmarender/Data search

Martijn van Oosterhout kleptog at gmail.com
Fri Jul 11 15:07:55 BST 2008


2008/7/10 Arne Goetje <arne at linux.org.tw>:
> Now for Mapnik and Osmarender: we want to add a layer for each language
> code on top of the default rendering layer (which uses English and the
> normal 'name' and 'ref' tags), which uses the localized 'name:$lang' and
> 'ref:$lang' tags and the 'name' and 'ref' tags as fallback.
>
> How do we do that?

The the fy layer on the NL tileserver I have script that does a
search/replace name -> name:fy and then adjust the query down the
bottom to replace all the "name" columns with:

coalesce("name:fy", "name") as "name:fy"

Coalesce takes the first non-null value, which is what we want here.

Note, it's probably also possible to just change the query down the
bottom and leave the rest of the style alone.

Hope this helps,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list