From the proposal:
Software generally assumes that the suffix of the name key is a ISO 639 language code such as “en”, “de” etc.
Software should assume that only a valid IETF BCP 47 language tag (such as an ISO 639 language code) can represent a language subkey. signed
is not a valid language tag. In case it helps, here’s a regular expression for matching name subkeys in Java, and here are tests to prove that it works.
The root of the issue is that subkeys of name
serve two different purposes:
- This is another name in another context:
name:en
,name:genitive
,name:left
. Sometimes this is expressed as a different base key:alt_name
,official_name
,sorting_name
. - This key refines
name
with something you should know about the value of that tag:name:pronunciation
,name:etymology
,name:signed
. Sometimes this is expressed as a prefix:source:name
. In the specific case ofname:pronunciation
, technically we should’ve instead chosen e.g.name:en-fonipa
for better standards compliance, but I suspect Nominatim would’ve had to special-case that anyways.
Which usage is worse? I think that’s mostly a subjective, aesthetic decision, since OSM keys are too inconsistent for there to be very much automated logic around their structure. The latter usage exists because the data model does not formally support associating a key with an array of values or an array of key-value tables. (If it did, this thread wouldn’t have stretched for over 200 comments and counting.)
While understandable, it was not the most forward-thinking decision to make language tags direct subkeys of name:*
. It essentially assumed that no two- or three-letter English word would reasonably be a standard subkey. Naturally, to
became a popular key, and Valhalla’s developers riffed off it by promoting destination:to
. But this is not the name of the destination in the Tongan language; that would have to be destination:lang:to
.
StreetComplete apparently regrets its promotion of *:signed
because it affects not only name:*
but also various other keys that could come with their own standard subkeys. But if the goal is to make key construction more predictable, there would be a long way to go. This table of standard key slots has an additional row for not only *:signed
but also *:wikidata
.
Meanwhile, I can never remember if psv:lanes
or lanes:psv
is the one with the vertical bars in it.