stadiamaps / maplibre-search-box

Add an autocompleting, search-as-you-type control to MapLibre powered by Stadia Maps Autocomplete Search API.
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

Unable to localize results descriptions #3

Closed toniopelo closed 4 days ago

toniopelo commented 11 months ago

We should have a way of localizing "Locality in France" or "Venue in France" label under each result title IMO. See screenshot for an example.

image

ianthetechie commented 10 months ago

Thanks for bringing this up @toniopelo (and sorry for not noticing this and your other PR; something is up with my GitHub email notifications)!

I'm also quite interested to improve the localization. Let's try to specify the desired outcomes a bit better.

First, under what conditions does the subtext change? My suggestion would be that this is dependent on the user's browser (Accept-Language headers, specifically). So if, say, my device is set to prefer French, it would show some text in French.

Second, we are not entirely satisfied with the "Venue in France" style of representing things to be completely honest. These terms are rather specific to the API schema, which is itself based on Who's on First placetypes, but these terms don't actually mean anything to the average user. We have considered replacing these "place type" qualifiers with a simplified set of icons.

So, one way we could simplify things (and avoid having to localize a technical string that isn't going to be that useful to most end users anyways) is to have the subtext line just be like " France" (or, for an example where the English name is different, " Deutschland"). This would definitely result in showing less information, but I think there is probably a balance to be found. Do you have any thoughts on this?