-
Notifications
You must be signed in to change notification settings - Fork 8
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
RD-294: Move the list of map languages to maptiler-client #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For addLanguageGeocodingOptions
we should probably not auto-detect it on client-side but on server-side, which is already implemented. That implementation uses Accept-Language
parameter and takes q
value into the account together with support of every provided language. Current implementation of addLanguageGeocodingOptions
which uses getAutoLanguageGeocoding
may pass also unsupported language if navigator
is undefined.
Actually if language
is not specified in options, this server-side detection applies as the language
url parameter is not added.
Also we should add support for no language preference which would result in searchParams.set("language", "")
call. I think that Language.LOCAL
could be used for this althought it is not 100% the same thing, as you will find London also when you type Londýn even you did not specify Slovak language.
I also prefer to use ternaries to multiple Also I prefer not using temporary variables, like But it is only my subjective preference. |
RD-294
The goal is to centralize the list of languages so that it can be used by multiple JS/TS tools and libraries.