[mkgmap-dev] Solution to show transliterated name if no other ascii name exists
From Gerd Petermann gpetermann_muenchen at hotmail.com on Sat Jan 10 16:01:59 GMT 2015
Hi Walter, I can't find any code that would implement the filter :ascii, but I seem to remember that I saw it in an email. Maybe as an proposion? Gerd > From: Walter.Schloegl-Resch at aon.at > To: mkgmap-dev at lists.mkgmap.org.uk > Date: Sat, 10 Jan 2015 02:08:41 +0100 > Subject: [mkgmap-dev] Solution to show transliterated name if no other ascii name exists > > For countries with foreign letters like Greece I want to show the int_name > first. > For other countries I want to show the int_name in brackets. > If no int_name or other good name is found, I want to show the > transliterated name. > > Here is my code: > > 'name:de'=* { add mkgmap_int_name='${name:de}' } > int_name=* { add mkgmap_int_name='${int_name}' } > 'name:en'=* { add mkgmap_int_name='${name:en}' } > 'name:fr'=* { add mkgmap_int_name='${name:fr}' } > 'name:es'=* { add mkgmap_int_name='${name:es}' } > mkgmap_int_name!=* { add mkgmap_int_name='${name|ascii:}' } > # Error: Expecting }, instead saw | > mkgmap_int_name=${name} { delete mkgmap_int_name } > > place=* { set mkgmap_place_name=no } > place=* & mkgmap_int_name=* & mkgmap:country=GRE { set > name='${mkgmap_int_name} (${name})'; set mkgmap_place_name=yes } > place=* & mkgmap_int_name=* & mkgmap_place_name=no { set name='${name} > (${mkgmap_int_name})'; set mkgmap_place_name=yes } > > According to the error message it seems, that |ascii: is not recognized. > Is this syntax wrong? > I found it via google but not in documentation, maybe it’s not yet working. > > I hope somebody has a working solution for my usecase. > > Walter > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150110/806fc67a/attachment.html>
- Previous message: [mkgmap-dev] Solution to show transliterated name if no other ascii name exists
- Next message: [mkgmap-dev] Solution to show transliterated name if no other ascii name exists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list