Nodejs.org: How to link to the downloads page without specifying a language?

Created on 13 Apr 2019  ·  11Comments  ·  Source: nodejs/nodejs.org


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?

All 11 comments

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.

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)?

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.

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.

@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

@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

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! 🙌🏽

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbhrdt picture gbhrdt  ·  4Comments

celyes picture celyes  ·  5Comments

luminoso picture luminoso  ·  3Comments

Aissaoui-Ahmed picture Aissaoui-Ahmed  ·  3Comments

vsemozhetbyt picture vsemozhetbyt  ·  4Comments