Styles, typ and multiple languages

Hi. I am looking into a pattern where a name of a map point is given in a local word, which is not easy for foreigners. Instead of showing the name as the name, i would like to move it into the information which becomes available when clicking on a point on a Garmin device. Hence leaving the name empty or removed. Example: Say we have a lean-to shelter somewhere in Sweden. The name is set as: "Vindskydd rastaplatsen". For any foreigner, this may not say a lot. Whereas in the TYP file it is defined with the description: .. String=Lean to shelter String6=0x07,Vindskydd String7=0x15,Schronienie String10=0x0f,Gapahuk etc. etc. .. So when pointing/hovering this object on the GPS unit, i will tell me in the local language (which is set up on the unit) what it is (taken from the TYP file). When clicking the item, i will get the info page with additional details, and here is the name. But the question is now: how do i get the additional details to the info page? Can i just add any tag an it will show? Would something like this work? tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add info = '$ {name}'; delete name} [0x2b05 resolution 24] Is it otherwise possible to define multiple name tags, one per language? name = general name name:en = English name name:se = Swedish name so that the device will pick up the correct one based on the language settings? Regards Karl

Hi Karl I don't think what you are hoping for can be done. Some of it is possible for special cases, but not generally. If a POI has a name and the name is the same as a TYP translation, then logic can be added to the rule for the point to suppress the name, eg, for english: sport=swimming {set name='${name|not-equal:"Swimming Pool"}'} [0x...] It is unlikely that any OSM objects are tagged in this rather pointless way. There isn't anywhere except the name/label field for a specific name, and, apart from Roads, there is only 1 name field. The behaviour of Garmin devices differs regarding showing static information from the typeCode and/or the name in the map. Some show both when the item is selected, others just the name if set or the TYP translation otherwise (and just say "Unnamed" if the item isn't defined in the TYP file). A good option for making a more useable map of a foreign country by a speaker of another language is --name-tag-list. For example, make a map of Morocco I use: --name-tag-list=name:en,int_name,name:fr,name,place_name,loc_name Does this answer your question about multiple name tags? Ticker On Fri, 2020-11-06 at 19:40 +0100, 7770 wrote:
Hi.
I am looking into a pattern where a name of a map point is given in a local word, which is not easy for foreigners. Instead of showing the name as the name, i would like to move it into the information which becomes available when clicking on a point on a Garmin device. Hence leaving the name empty or removed.
Example: Say we have a lean-to shelter somewhere in Sweden. The name is set as: "Vindskydd rastaplatsen". For any foreigner, this may not say a lot. Whereas in the TYP file it is defined with the description: .. String=Lean to shelter String6=0x07,Vindskydd String7=0x15,Schronienie String10=0x0f,Gapahuk etc. etc. ..
So when pointing/hovering this object on the GPS unit, i will tell me in the local language (which is set up on the unit) what it is (taken from the TYP file). When clicking the item, i will get the info page with additional details, and here is the name.
But the question is now: how do i get the additional details to the info page? Can i just add any tag an it will show?
Would something like this work? tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add info = '$ {name}'; delete name} [0x2b05 resolution 24]
Is it otherwise possible to define multiple name tags, one per language? name = general name name:en = English name name:se = Swedish name
so that the device will pick up the correct one based on the language settings?
Regards Karl
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi. I answers the question, though may not help too much.. How does the --poi-address work? It states that it enables address / phone information to POIs. Is this a feature of Garmin devices that only works for exactly address and phone. I think i have seen some maps with opening hours added to POIs. Can the same idea/pattern be used for anything? Opentopomap does like this for opening hours and website: opening_hours=* {set mkgmap:region='${opening_hours|subst:Tu=>Di|subst:We=>Mi| subst:Th=>Do|subst:Su=>So}' } website=* {set mkgmap:region='${mkgmap:region} ${website}'} etc. But maybe this breaks other functionality? Regards Karl On måndag 9 november 2020 kl. 10:57:39 CET Ticker Berkin wrote:
Hi Karl
I don't think what you are hoping for can be done. Some of it is possible for special cases, but not generally.
If a POI has a name and the name is the same as a TYP translation, then logic can be added to the rule for the point to suppress the name, eg, for english:
sport=swimming {set name='${name|not-equal:"Swimming Pool"}'} [0x...]
It is unlikely that any OSM objects are tagged in this rather pointless way.
There isn't anywhere except the name/label field for a specific name, and, apart from Roads, there is only 1 name field.
The behaviour of Garmin devices differs regarding showing static information from the typeCode and/or the name in the map. Some show both when the item is selected, others just the name if set or the TYP translation otherwise (and just say "Unnamed" if the item isn't defined in the TYP file).
A good option for making a more useable map of a foreign country by a speaker of another language is --name-tag-list. For example, make a map of Morocco I use: --name-tag-list=name:en,int_name,name:fr,name,place_name,loc_name Does this answer your question about multiple name tags?
Ticker
On Fri, 2020-11-06 at 19:40 +0100, 7770 wrote:
Hi.
I am looking into a pattern where a name of a map point is given in a local word, which is not easy for foreigners. Instead of showing the name as the name, i would like to move it into the information which becomes available when clicking on a point on a Garmin device. Hence leaving the name empty or removed.
Example: Say we have a lean-to shelter somewhere in Sweden. The name is set as: "Vindskydd rastaplatsen". For any foreigner, this may not say a lot. Whereas in the TYP file it is defined with the description: .. String=Lean to shelter String6=0x07,Vindskydd String7=0x15,Schronienie String10=0x0f,Gapahuk etc. etc. ..
So when pointing/hovering this object on the GPS unit, i will tell me in the local language (which is set up on the unit) what it is (taken from the TYP file). When clicking the item, i will get the info page with additional details, and here is the name.
But the question is now: how do i get the additional details to the info page? Can i just add any tag an it will show?
Would something like this work? tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add info = '$ {name}'; delete name} [0x2b05 resolution 24]
Is it otherwise possible to define multiple name tags, one per language? name = general name name:en = English name name:se = Swedish name
so that the device will pick up the correct one based on the language settings?
Regards Karl
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Karl Yes, for POI there is an address and phone number and the address components can be misused as you suggest. I've just experimented with this and haven't found any disruption of normal address searches. It is best to append to one of the address fields after any other address processing has been done, so I suggest putting any code after: include 'inc/address'; towards the bottom of your 'points' file In the UK the postcode field comes last, so it looks better to append to this, rather than the region. I've added: opening_hours=* {set mkgmap:postal_code='${mkgmap:postal_code}. Open ${opening_hours}' | 'Open ${opening_hours}'} website=* {set mkgmap:postal_code='${mkgmap:postal_code}. ${website}' | '${website}'} Which keeps any existing postcode and doesn't add unnecessary ". " I don't know what the size limitations for these fields. Ticker On Mon, 2020-11-09 at 18:06 +0100, 7770 wrote:
Hi. I answers the question, though may not help too much..
How does the --poi-address work? It states that it enables address / phone information to POIs. Is this a feature of Garmin devices that only works for exactly address and phone. I think i have seen some maps with opening hours added to POIs. Can the same idea/pattern be used for anything?
Opentopomap does like this for opening hours and website: opening_hours=* {set mkgmap:region='${opening_hours|subst:Tu=>Di|subst:We=>Mi| subst:Th=>Do|subst:Su=>So}' } website=* {set mkgmap:region='${mkgmap:region} ${website}'} etc.
But maybe this breaks other functionality?
Regards Karl
On måndag 9 november 2020 kl. 10:57:39 CET Ticker Berkin wrote:
Hi Karl
I don't think what you are hoping for can be done. Some of it is possible for special cases, but not generally.
If a POI has a name and the name is the same as a TYP translation, then logic can be added to the rule for the point to suppress the name, eg, for english:
sport=swimming {set name='${name|not-equal:"Swimming Pool"}'} [0x...]
It is unlikely that any OSM objects are tagged in this rather pointless way.
There isn't anywhere except the name/label field for a specific name, and, apart from Roads, there is only 1 name field.
The behaviour of Garmin devices differs regarding showing static information from the typeCode and/or the name in the map. Some show both when the item is selected, others just the name if set or the TYP translation otherwise (and just say "Unnamed" if the item isn't defined in the TYP file).
A good option for making a more useable map of a foreign country by a speaker of another language is --name-tag-list. For example, make a map of Morocco I use: --name-tag-list=name:en,int_name,name:fr,name,place_name,loc_name Does this answer your question about multiple name tags?
Ticker
On Fri, 2020-11-06 at 19:40 +0100, 7770 wrote:
Hi.
I am looking into a pattern where a name of a map point is given in a local word, which is not easy for foreigners. Instead of showing the name as the name, i would like to move it into the information which becomes available when clicking on a point on a Garmin device. Hence leaving the name empty or removed.
Example: Say we have a lean-to shelter somewhere in Sweden. The name is set as: "Vindskydd rastaplatsen". For any foreigner, this may not say a lot. Whereas in the TYP file it is defined with the description: .. String=Lean to shelter String6=0x07,Vindskydd String7=0x15,Schronienie String10=0x0f,Gapahuk etc. etc. ..
So when pointing/hovering this object on the GPS unit, i will tell me in the local language (which is set up on the unit) what it is (taken from the TYP file). When clicking the item, i will get the info page with additional details, and here is the name.
But the question is now: how do i get the additional details to the info page? Can i just add any tag an it will show?
Would something like this work? tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add info = '$ {name}'; delete name} [0x2b05 resolution 24]
Is it otherwise possible to define multiple name tags, one per language? name = general name name:en = English name name:se = Swedish name
so that the device will pick up the correct one based on the language settings?
Regards Karl
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi. Thanks all for the ideas, it works well to add information. The one thing i was not able to complete was to delete the name. First i have: tourism=lean_to | (amenity=shelter & shelter_type=lean_to) [0x2b05 resolution 24] and after the include section: tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add mkgmap:phone = '${name}'; delete name} The text from the name is nicely added into the phone section. But the name remains, instead of being deleted... (what did i do wrong?) Regard Karl On måndag 9 november 2020 kl. 21:19:26 CET Ticker Berkin wrote:
Hi Karl Yes, for POI there is an address and phone number and the address components can be misused as you suggest. I've just experimented with this and haven't found any disruption of normal address searches. It is best to append to one of the address fields after any other address processing has been done, so I suggest putting any code after: include 'inc/address'; towards the bottom of your 'points' file In the UK the postcode field comes last, so it looks better to append to this, rather than the region. I've added: opening_hours=* {set mkgmap:postal_code='${mkgmap:postal_code}. Open ${opening_hours}' | 'Open ${opening_hours}'} website=* {set mkgmap:postal_code='${mkgmap:postal_code}. ${website}' | '${website}'} Which keeps any existing postcode and doesn't add unnecessary ". " I don't know what the size limitations for these fields. Ticker
On Mon, 2020-11-09 at 18:06 +0100, 7770 wrote:
Hi. I answers the question, though may not help too much..
How does the --poi-address work? It states that it enables address / phone information to POIs. Is this a feature of Garmin devices that only works for exactly address and phone. I think i have seen some maps with opening hours added to POIs. Can the same idea/pattern be used for anything?
Opentopomap does like this for opening hours and website: opening_hours=* {set mkgmap:region='${opening_hours|subst:Tu=>Di|subst:We=>Mi| subst:Th=>Do|subst:Su=>So}' } website=* {set mkgmap:region='${mkgmap:region} ${website}'} etc.
But maybe this breaks other functionality?
Regards Karl
On måndag 9 november 2020 kl. 10:57:39 CET Ticker Berkin wrote:
Hi Karl
I don't think what you are hoping for can be done. Some of it is possible for special cases, but not generally.
If a POI has a name and the name is the same as a TYP translation, then logic can be added to the rule for the point to suppress the name, eg,
for english: sport=swimming {set name='${name|not-equal:"Swimming Pool"}'}
[0x...]
It is unlikely that any OSM objects are tagged in this rather pointless way.
There isn't anywhere except the name/label field for a specific name, and, apart from Roads, there is only 1 name field.
The behaviour of Garmin devices differs regarding showing static information from the typeCode and/or the name in the map. Some show both when the item is selected, others just the name if set or the TYP translation otherwise (and just say "Unnamed" if the item isn't defined in the TYP file).
A good option for making a more useable map of a foreign country by a speaker of another language is --name-tag-list.
For example, make a map of Morocco I use: --name-tag-list=name:en,int_name,name:fr,name,place_name,loc_name
Does this answer your question about multiple name tags?
Ticker
On Fri, 2020-11-06 at 19:40 +0100, 7770 wrote:
Hi.
I am looking into a pattern where a name of a map point is given in a local word, which is not easy for foreigners. Instead of showing the name as the name, i would like to move it into the information which becomes available when clicking on a point on a Garmin device. Hence leaving the name empty or removed.
Example: Say we have a lean-to shelter somewhere in Sweden. The name is set as: "Vindskydd rastaplatsen". For any foreigner, this may not say a lot. Whereas in the TYP file it is defined with the description: .. String=Lean to shelter String6=0x07,Vindskydd String7=0x15,Schronienie String10=0x0f,Gapahuk etc. etc. ..
So when pointing/hovering this object on the GPS unit, i will tell me in the local language (which is set up on the unit) what it is (taken from the TYP file). When clicking the item, i will get the info page with additional details, and here is the name.
But the question is now: how do i get the additional details to the info page? Can i just add any tag an it will show?
Would something like this work? tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add info = '$ {name}'; delete name} [0x2b05 resolution 24]
Is it otherwise possible to define multiple name tags, one per language? name = general name name:en = English name name:se = Swedish name
so that the device will pick up the correct one based on the language settings?
Regards Karl
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Karl It is the labels (mkgmap:label:n n=1..4) that show as the "name" on the device. These can also be set with the "addlabel" and "name" commands; see style manual section 4.3.5 and 4.3.6 The various style files have the rule: name=* {name '${name}'} to do this, but sometimes the "name" command is used earlier as well Ticker On Tue, 2020-11-10 at 15:19 +0100, 7770 wrote:
Hi.
Thanks all for the ideas, it works well to add information. The one thing i was not able to complete was to delete the name.
First i have: tourism=lean_to | (amenity=shelter & shelter_type=lean_to) [0x2b05 resolution 24]
and after the include section: tourism=lean_to | (amenity=shelter & shelter_type=lean_to) {add mkgmap:phone = '${name}'; delete name}
The text from the name is nicely added into the phone section. But the name remains, instead of being deleted... (what did i do wrong?)
Regard Karl

Now i got it and it works. Many thanks indeed to all! :-) Regards Karl On tisdag 10 november 2020 kl. 18:38:12 CET Ticker Berkin wrote:
Hi Karl
It is the labels (mkgmap:label:n n=1..4) that show as the "name" on the device. These can also be set with the "addlabel" and "name" commands; see style manual section 4.3.5 and 4.3.6
The various style files have the rule: name=* {name '${name}'} to do this, but sometimes the "name" command is used earlier as well
Ticker
On Tue, 2020-11-10 at 15:19 +0100, 7770 wrote:
Hi.
Thanks all for the ideas, it works well to add information. The one thing i was not able to complete was to delete the name.
First i have: tourism=lean_to | (amenity=shelter & shelter_type=lean_to)
[0x2b05 resolution 24]
and after the include section: tourism=lean_to | (amenity=shelter & shelter_type=lean_to)
{add mkgmap:phone = '${name}'; delete name}
The text from the name is nicely added into the phone section. But the name remains, instead of being deleted... (what did i do wrong?)
Regard Karl
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I've implemented the following; created an inc file, with the following code: # SETUP Name Translation to display names in correct codepage 1252 non-unicode name = * & mkgmap:country=MNG {set name='${name:en}' | '${int_name}' |'${name:pt}' | '${name:fr}' | '${name}' } #Mongolia name = * & mkgmap:country=MAR {set name='${name:en}' | '${int_name}' |'${name:pt}' | '${name:fr}' | '${name}' } #Morocco name = * & mkgmap:country=MRT {set name='${name:en}' | '${int_name}' |'${name:pt}' | '${name:fr}' | '${name}' } #Mauritania name = * & mkgmap:country=DZA {set name='${name:en}' | '${int_name}' |'${name:pt}' | '${name:fr}' | '${name}' } #Algeria name = * & mkgmap:country=KAZ {set name='${name:en}' | '${int_name}' |'${name:pt}' | '${name:fr}' | '${name}' } #Kazakstan name = * {name '$(name)'} This results in a nicely "readable" map. More countries, just add more definitions. On 11/11/2020 7:35 pm, 7770 wrote:
Now i got it and it works. Many thanks indeed to all! :-)
Regards Karl
On tisdag 10 november 2020 kl. 18:38:12 CET Ticker Berkin wrote:
Hi Karl
It is the labels (mkgmap:label:n n=1..4) that show as the "name" on the device. These can also be set with the "addlabel" and "name" commands; see style manual section 4.3.5 and 4.3.6
The various style files have the rule: name=* {name '${name}'} to do this, but sometimes the "name" command is used earlier as well
Ticker
On Tue, 2020-11-10 at 15:19 +0100, 7770 wrote:
Hi.
Thanks all for the ideas, it works well to add information. The one thing i was not able to complete was to delete the name.
First i have: tourism=lean_to | (amenity=shelter & shelter_type=lean_to)
[0x2b05 resolution 24]
and after the include section: tourism=lean_to | (amenity=shelter & shelter_type=lean_to)
{add mkgmap:phone = '${name}'; delete name}
The text from the name is nicely added into the phone section. But the name remains, instead of being deleted... (what did i do wrong?)
Regard Karl
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi I prefer: --name-tag-list=name:en,int_name,name,place_name,loc_name for most maps, but where the country frequently has parallel naming in a European language, eg French for Morocco, I use: --name-tag-list=name:en,int_name,name:fr,name,place_name,loc_name Adjust above for your own language, but probably leave name:en in the list anyway Ticker On Thu, 2020-12-31 at 09:24 +1100, Joao Almeida wrote:
I've implemented the following;
created an inc file, with the following code:
# SETUP Name Translation to display names in correct codepage 1252 non-unicode name = * & mkgmap:country=MNG {set name='${name:en}' | '${int_name}'
'${name:pt}' | '${name:fr}' | '${name}' } #Mongolia name = * & mkgmap:country=MAR {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Morocco name = * & mkgmap:country=MRT {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Mauritania name = * & mkgmap:country=DZA {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Algeria name = * & mkgmap:country=KAZ {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Kazakstan
name = * {name '$(name)'}
This results in a nicely "readable" map. More countries, just add more definitions.

For info, I have the following in my style file - you may find something similar useful: # set English variant as main name and Welsh variant as secondary in Wales name=* & name:en=* & name:cy!=* & name:en!=$name & mkgmap:admin_level4='Wales' {set name:cy='${name}'} name:cy=* & mkgmap:admin_level4!='Wales' {delete name:cy} name:en=* & name:en!=$name & mkgmap:option:non-uk!=true {set name='${name:en}'} name=$name:cy {delete name:cy} highway=residential {name '${name}'; addlabel '${name:cy}'; addlabel '${alt_name}'; addlabel '${loc_name}'} ... Cheers, Mike -----Original Message----- From: Ticker Berkin [mailto:rwb-mkgmap@jagit.co.uk] Sent: 31 December 2020 11:00 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Styles, typ and multiple languages Hi I prefer: --name-tag-list=name:en,int_name,name,place_name,loc_name for most maps, but where the country frequently has parallel naming in a European language, eg French for Morocco, I use: --name-tag-list=name:en,int_name,name:fr,name,place_name,loc_name Adjust above for your own language, but probably leave name:en in the list anyway Ticker On Thu, 2020-12-31 at 09:24 +1100, Joao Almeida wrote:
I've implemented the following;
created an inc file, with the following code:
# SETUP Name Translation to display names in correct codepage 1252 non-unicode name = * & mkgmap:country=MNG {set name='${name:en}' | '${int_name}'
'${name:pt}' | '${name:fr}' | '${name}' } #Mongolia name = * & mkgmap:country=MAR {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Morocco name = * & mkgmap:country=MRT {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Mauritania name = * & mkgmap:country=DZA {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Algeria name = * & mkgmap:country=KAZ {set name='${name:en}' | '${int_name}' '${name:pt}' | '${name:fr}' | '${name}' } #Kazakstan
name = * {name '$(name)'}
This results in a nicely "readable" map. More countries, just add more definitions.
participants (4)
-
7770
-
Joao Almeida
-
Mike Baggaley
-
Ticker Berkin