pnorman / spirit

Creative Commons Zero v1.0 Universal
11 stars 1 forks source link

Decide how to encode multilingual names #10

Open pnorman opened 1 year ago

pnorman commented 1 year ago

For multilingual names, it is necessary to fall back through multiple languages to select the appropriate value.

As an example, an object might have name=東京都 name:en=Tokyo name:ja=東京都. For French user, it would fall back from the non-existent name:fr to display name:en. This figuring out of which tags to use could be done server-side or client-side.

A few properties are needed

  1. Avoid ballooning the number of vector tile attributes for all objects. e.g. a street with just a name tag should not have dozens of name attributes for all possible languages.
  2. Avoid requiring complicated client-side logic.

My inclination is to produce vector tile attributes that produce the right name for a language when you coalesce the language specific attribute with the general attribute. So, for the example above, you would produce attributes for the name in English, French, the general attribute, but not Japanese because that is covered by the general attribute.

pnorman commented 1 year ago

Note: Depends on https://github.com/pnorman/tilekiln/issues/3