Copy link
@1ec5

1ec5 Nov 8, 2024

I see you used cr-Latn in your issue osmus/tileservice#20. Does that mean only valid ISO codes can or should be be used in the tileservice?

Technically, the tile service can pass anything into Planetiler and it’ll look for a matching subkey. However, we should try to only include valid IETF BCP 47 language tags (including ISO 15924 script codes).

The name:* namespace used to be a mess, but around 2018 there was a concerted effort to align subkeys with BCP 47 as much as possible, especially in Asia where script codes were commonplace for romanizations. As that longwinded page points out, standard codes have the benefit of being automatically compatible with client-side software, including the browser API that this project uses to convert these codes into human-readable language names. Wikidata has also standardized on BCP 47, so the Wikidata label fallback will only work if we follow the standard.

The tile service’s list of languages needs a bit of a cleanup. We originally generated it by simply listing out all the name:*=* subkeys with over a certain number of occurrences, but this pulled in an assortment of non-languages like left and right. We can still keep adding to the list in the meantime.

I actually also saw cr-SRO in the name: list, per Wikipedia I'm guessing this is "Standard Roman Orthography" - wonder if this could be retagged to cr-Latn as well, or cr-SRO should be added here?

Yes, I think it should be retagged as name:cr-Latn=*. No specific romanization system has been registered with the IANA Language Subtag Registry, but this seems to be the most important one, so I don’t think it needs to be called out specifically. At a glance, I also see no co-occurrence of name:cr-sro=* or name:cr-SRO=* with name:cr-Latn=*, name:cr-latin=*, or Latin text in name:cr=*, so it should be safe to do a find-and-replace.