-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Translate Switcher #238
Comments
I'd support being able to translate the switcher, so e.g. French would be able to switch to Anglais, but I think that the English documentation should use the English names for languages -- especially given some languages use non-latin scripts. There has been talk in the past of changing the switcher to use a dedicated 'choose language' page, which would give us more options here -- for example using the language's local name and 'native' name, i.e. French / Français. This pattern is used for example in the React documentation, sort-of in PHP (the documentation landing page requires choosing a language), and on the Apple website. For contrast, Rust uses a switcher (though hidden at the bottom of the page), MDN has a switcher in native languages/scripts, and Go doesn't have translations on their official website. A |
The order now is sorted alphabetically by ISO codes of languages. I would oppose to translate language names and sort alphabetically, because then the order of languages would be not stable, would change from language to language and that would create a bad user experience, in my opinion. |
Probably sorting alphabetically by English names and translating would be optimal to keep the best user experience.
As far as I'm concerned the switcher is not part of the theme, so we would need a new translation project/entrypoint (we can't integrate it easily with theme translations) unless would like to use some third party library that provides language name translations. Sorting and translating seem somewhat separate, maybe we could create a separate issue for translating? |
@m-aciek I will convert this issue to just translating. As it seems there is not much left to discuss about sorting. |
I don't get the idea of translating all the languages on the switcher. As an example: I can read french and english, but not chinese / japanese / korean. If I land on a CJK page, if the language switchers displays me a list like: |
@JulienPalard I'm not exactly sure what @AA-Turner meant but I think all languages should be in their native for example if I only speak Polish then I wouldn't know what "Polish" is as it is "Polski" in Polish. |
Yes, so we'd show something like this:
Or perhaps include English and the native name:
And use the same list for every translation's switcher. |
From my understanding simply changing the names in the config should work, correct? I can research the names and open a PR. |
I expect so, but nothing's ever simple ;) Which of the two options do people prefer: just native name, or English + native? |
I think just native is fine. That is the standard most websites use (all alphabet and microsoft products for example) |
IMO, readers need:
English names make alphabetical sorting possible, which makes finding your language easier if you know its English name. Which you most likely do even if you don't speak English. From the examples in the first post, I like Google's icon: If you land on a page in an unfamiliar language (or ever writing system), that's what you look for. Wikipedia has one that's more correct (it's about writing, not geography) but less recognizable: (UN's page works well but it's only a language switcher; cppreference looks like they just used a default.) |
I like the icon idea but that would require work on the python-docs-theme side. And now we have three options! (Hopefully it won't extend any further.
GitHub does not have a voting method so I propose: |
@encukou suggested using slash as a separator, instead of brackets. I propose to vote below:
(An entry with a slash is slightly shorter in width than brackets). Regarding the order, in my opinion with English name first it would be easier to visually find the language having the latin script and entries ordered alphabetically by English name, especially when the list will grow further. |
My opinion on that depends on the order:
|
I propose translating the languages in the switcher to their native name so that the translations are more accessible.
Examples of where this is done
un.org
un.org screenshot
google.com Uses both the local language name and the language's native name
google.com screenshot
cppreference.com
cppreference.com screenshot
The text was updated successfully, but these errors were encountered: