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

How to link to the downloads page without specifying a language? #2183

Closed
missmatsuko opened this issue Apr 12, 2019 · 11 comments
Closed

How to link to the downloads page without specifying a language? #2183

missmatsuko opened this issue Apr 12, 2019 · 11 comments

Comments

@missmatsuko
Copy link

missmatsuko commented Apr 12, 2019

I'd like to link to the page at https://nodejs.org/en/download/ without specifying a language so that whoever clicks the link will be more likely to get the page in a language they understand (especially since there's no language picker).

I don't think linking to https://nodejs.org/en/download/ will redirect to the user's language because when I go to https://nodejs.org/fr/download/, I don't get redirected to English.

For other pages, I can just remove the language code. For example, I can link to https://nodejs.org/about/ and it redirects to the appropriate language.

But when I link to https://nodejs.org/download/, it shows a file directory instead of redirecting to https://nodejs.org/en/download/

I saw in #240 that the directory at /download is meant to be there, and maybe necessary for downloads to work.

Maybe the content page should be changed to /downloads instead?

@fhemberger
Copy link
Contributor

The redirects date back to the earliest versions of the Node.js website (pre-2015), that's the only reasons they exist. nodejs.org/<lang>/<page> is the canonical URL for all pages.

@missmatsuko
Copy link
Author

So is there no way to reliably link to a page without specifying a language?

Do all those pre-2015 links redirect to the English version of the page?

Can the behaviour be changed to redirect to the user's preferred language version (when possible)?

@fhemberger
Copy link
Contributor

Yes, they all point to English as default language (as it also is the most complete language version, translation wise).

At this point, there's no way to link to your browser's preferred language setting, unfortunately. There is only a third-party nginx extension to parse the Accept-Language header which we didn't add for security considerations. (And of course I can't find the original issue right now, where we discussed this before 😄).

Anyway, we are working on a complete website redesign at the moment (see https://github.com/nodejs/website-redesign/), so things might change in the future.

@thom4parisot
Copy link

thom4parisot commented Apr 13, 2019

I figured out there is an alternative nginx configuration, it requires no third-party module.

It's nice to be able to read a browser-defined prefered language content when available.

@fhemberger
Copy link
Contributor

@oncletom You can open an issue in https://github.com/nodejs/build/ to discuss the changes.

nginx config is here: https://github.com/nodejs/build/blob/master/setup/www/resources/config/nodejs.org

@missmatsuko
Copy link
Author

missmatsuko commented Apr 13, 2019

@fhemberger Should I make this issue in the website redesign repo? Maybe just a general localization issue, as I didn't see one.

I also noticed the current site doesn't have hreflang urls in the head, making it harder for people (and search engines) to find their language's version of the page. I think some browsers will suggest the user's preferred localization version of the site if these tags are in place.

https://en.wikipedia.org/wiki/Hreflang

@keywordnew
Copy link
Contributor

Yes, please do make an issue in nodejs/website-redesign. Folks should be aware of this need as the redesign comes together, before the download page is implemented. Linking back to this issue would also be super helpful.

Thank you! 🙌🏽

@alexandrtovmach
Copy link
Contributor

Language picker already implemented and bug seems like no more reproduce, so good to close this issue

@missmatsuko
Copy link
Author

@alexandrtovmach Not sure what bug you're referring to?

https://nodejs.org/download/ still doesn't redirect to any language download page, but maybe that's going to be addressed in the new site.

@alexandrtovmach
Copy link
Contributor

@missmatsuko Sorry for disappointing. The bug that you're mentioned in the issue, it's not actually a bug 🤷‍♂️. That's expected result of current architecture of the website. In the same time, we are already implemented language picker, so you can use link to English version, and users will change locale if they need.

@missmatsuko
Copy link
Author

Well you said bug can't reproduced but I still don't know what you meant by that. Nevermind, I guess!

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