-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Norwegian names and language codes #1114
Comments
(Is the name of countries special cased BTW? When selecting "language=nn", Chad is incorrectly spelled "Tchad", even though the |
Admittedly the language fallback logic is not very sophisticated. Here’s where it lives: We could certainly add these special cases for Norwegian, since they’re pretty straightforward. More subjective fallbacks should probably be a server-side responsibility when generating the tiles, since the MapLibre expression language doesn’t give us very thorough text processing capabilities.
Most browsers or operating systems have a setting that lets you list languages in a preferred order. We do support this setting. You can manually specify Bokmål or Nynorsk as a fallback using the widget in the lower-right corner of the map. Alternatively, you can set the
Yes, the vector tiles don’t actually indicate the name of the administrative area on either side of a boundary, just the country code, so the boundary edge labels rely on your Web browser to convert the country code into a name in your preferred language. Most browsers get these names from the CLDR project. We would prefer to get the names from the tiles, for consistency with the main country labels, but this is the best we can do for now. You can contribute to CLDR, which will improve the state of localization industry-wide. |
Is this the logic that's requested? This sounds similar to the case with simplified and traditional Chinese, which might both fall back to |
Yes, that's the gist of it. The problem is what to do when being requested |
Being able to select a preferred display language for names is awesome!
Currently though, Norwegian language codes aren't working perfectly out of the box.
Quick rundown of the situation:
Norwegian, with the language code
no
is one language.It does however have two written forms:
nn
nb
Both written forms are equal under the law, Norwegians learn both in school, but there is a geographic divide in which of the two forms is more commonly used.
For place names though, they rarely disagree. This means Norwegian names for places are usually using the key
name:no
, with the keysname:nn
andname:nb
mostly being used when the spelling is different. (Though names abroad sometimes use both these keys too even when they are equal).That means:
name:nn
displayed on the map, but if no such key is present, the map should usename:no
if it exists. Usingname:nb
as a further fallback depends on the usecase.name:no
should be used as a fallback forname:nb
.name:no
key is missing, the keysname:nn
andname:nb
should be used as fallback. This however only works if only one of them is present. If they are both present, they would need to be the same to be used. If they are different, one would have to open the can of worms of picking one of them as preferred, if one doesn't do something like peeking at the browser language to check which of the two forms the user prefers.Just another slightly complicated language situation out there :)
The text was updated successfully, but these errors were encountered: