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

Add a banner allowing the user to redirect to a localized version #9926

Open
timothyqiu opened this issue Sep 8, 2024 · 1 comment
Open
Labels
content:website Issues related to adding website features and fixing bugs, whether on the front or back-end enhancement

Comments

@timothyqiu
Copy link
Member

timothyqiu commented Sep 8, 2024

The language switcher on the bottom left is hardly discoverable for users not familiar with ReadTheDocs, as it's hidden by default.

I think it would benefit more users if we do some detection and provide the option to redirect to the user's preferred language on the docs page. For example, visiting https://www.adobe.com/ might prompt you with a similar dialog if your browser's preferred language is not English.

I'm not sure if ReadTheDocs/Sphinx actually allows implementing this. But if it does, the logic might be something like this:

  1. Check the Accept-Language header to see if we provide a version that matches the user's preferred language.
  2. If such a version exists, show a banner (like the "Up to date" banner) that contains:
        * A message possibly in that language.
        * A link that redirects to the same page in that language.
        * A close button that prevents this banner from showing again, at least in this session.

See also godotengine/godot-proposals#10538

@tetrapod00
Copy link
Contributor

tetrapod00 commented Sep 8, 2024

I'm in favor of this! One thing to consider is that the banners at the top of the page already take up a large chunk of space, and another banner only adds to that. Quick mockup with inspect element, on my default firefox browser at 100% zoom on a 1080 display:
firefox_uFv3rZ7fLC

This is the worst case scenario, with a tall "latest" docs banner and 3 paragraphs in the translation banner.

@skyace65 skyace65 added the content:website Issues related to adding website features and fixing bugs, whether on the front or back-end label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:website Issues related to adding website features and fixing bugs, whether on the front or back-end enhancement
Projects
None yet
Development

No branches or pull requests

3 participants