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

Translate Switcher #238

Open
StanFromIreland opened this issue Dec 27, 2024 · 7 comments
Open

Translate Switcher #238

StanFromIreland opened this issue Dec 27, 2024 · 7 comments

Comments

@StanFromIreland
Copy link
Contributor

StanFromIreland commented Dec 27, 2024

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

image

google.com Uses both the local language name and the language's native name

google.com screenshot

image

cppreference.com

cppreference.com screenshot

image

@AA-Turner
Copy link
Member

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

@m-aciek
Copy link
Contributor

m-aciek commented Dec 28, 2024

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.

@m-aciek
Copy link
Contributor

m-aciek commented Dec 28, 2024

Probably sorting alphabetically by English names and translating would be optimal to keep the best user experience.

translating

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?

@StanFromIreland
Copy link
Contributor Author

@m-aciek I will convert this issue to just translating. As it seems there is not much left to discuss about sorting.

@StanFromIreland StanFromIreland changed the title Reorder/Rename Switcher Translate Switcher Dec 29, 2024
@JulienPalard
Copy link
Member

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: 한국어 how would I be able to switch back to a language I understand?

@StanFromIreland
Copy link
Contributor Author

@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.

@hugovk
Copy link
Member

hugovk commented Dec 29, 2024

Yes, so we'd show something like this:

  • English
  • Français
  • Polski

Or perhaps include English and the native name:

  • English
  • French / Français
  • Polish / Polski

And use the same list for every translation's switcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants