Skip to content
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

Language picker in other languages #846

Open
wmisener opened this issue Mar 31, 2023 · 5 comments
Open

Language picker in other languages #846

wmisener opened this issue Mar 31, 2023 · 5 comments
Labels

Comments

@wmisener
Copy link
Collaborator

I love the language picker, it probably makes this style already the most easily multilingual OSM style I’ve seen. However, it’s somewhat ironic that it only finds languages if their name is typed in English. Is it technically feasible to search for languages with names other than their English one? By this I mean that typing "Esp" in the search should suggest "Español/Spanish". It might be unfeasible/overwhelming to have every language available at all times, but at least as a start maybe it could retrieve the native name for the language in its own tongue as well as English? So that either "Deutsch" or "German" would pull up German, "Español" or "Spanish" would pull up Spanish, "Nihongo" (or maybe in kanji instead/as well) or "Japanese" for Japanese, etc. Allowing searching on the ISO language codes could further this as well, though it'd be maybe less obvious for a new user.

Screenshots of what I mean:
Screen Shot 2023-03-31 at 12 36 54 PM
Typing "Esp" retrieves only Esperanto, whereas it'd be nice if it suggested "Spanish"/"Español".

Screen Shot 2023-03-31 at 12 37 15 PM

Typing "Deu" suggests nothing, whereas it'd be nice if it suggested "German"/"Deutsch"
@nickrsan
Copy link

nickrsan commented Mar 31, 2023

Allowing searching on the ISO language codes could further this as well, though it'd be maybe less obvious for a new user

I've wanted this as well, or alternatively a way to toggle to a view where I could select from a list. I think the search method is a good default, but it leaves a lot of mystery as to what's available, and sometimes I'm not sure if I'm not typing something correctly or if it's just not available.

@claysmalley
Copy link
Member

The names of the languages in the search field are actually in whatever display language you've picked (or browser settings if unspecified). If I put &language=de,en at the end of the URL, my search results are in German:

Screenshot from 2023-03-31 16-01-43

Though I agree that it would be helpful to search for language names in their native forms. Not everyone is going to know all the exonyms for their own language.

@wmisener
Copy link
Collaborator Author

Huh, that's not the behavior I experience, maybe I'm doing something wrong? I have language=es, but results are clearly in English, not Spanish
Screen Shot 2023-03-31 at 1 13 02 PM

@claysmalley
Copy link
Member

Ah, it requires refreshing the page. Guess that's another bug.

@1ec5
Copy link
Member

1ec5 commented Mar 31, 2023

If you changed the language parameter while looking at the page, it hot-swapped in the new language on the map, but the control needs to be updated too.

I agree that we should also include languages by their autonyms and ISO codes in the suggestions.

@claysmalley claysmalley added the enhancement New feature or request label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants