Experiment: Remember language 🧪 #739
Replies: 9 comments
-
This is an amazing experiment, I'd love to hear how it ends up helping folks read better on MDN! 📚 |
Beta Was this translation helpful? Give feedback.
-
I have just found this page from the "?" icon next to the feature. I just wanted to sing a few words of praise. A bit of feedback:
So what is my intent? It depends on the task:
A pet peeve of mine is clicking on an English result and seeing the German version, then having to scroll all the way to the bottom of the page to change the language. A bit later, I click another English result and the same thing happens again. I find your approach very elegant, and accommodating to all user intents. Very well done! |
Beta Was this translation helpful? Give feedback.
-
I was wondering why my automatic redirection to English was acting weird, turns out I don't need it anymore! Thank you for this QoL experiment! |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
OMG YOU ARE A SAVIOUR. For years I had to manually change the langague to english, because MDN translations are inconsistent (they generally have less content that the page in english and some layouts are broken). |
Beta Was this translation helpful? Give feedback.
-
tl;dr
We launched an experimental MDN feature on September 25, 2024 that allows users to choose their preferred language and automatically switch to this language when the requested content is available in that language.
Background
MDN is currently available in English (en-US) and 8 other translated languages (es, fr, ja, ko, pt-BR, ru, zh-CN, zh-TW) and users have always been able to switch to their preferred language manually using the language menu.
Problem
There have been two outstanding issues:
Solution
We have introduced a "Remember language" setting in the language menu. Enabling the setting saves the current language in the
preferredlocale
cookie, and this will prompt MDN to redirect users whenever they navigate to a page that is available in that language. Disabling the setting will delete the cookie, and users will no longer be redirected.Note: The cookie has been previously used to save the last language that the user switched to. For this reason, the setting is enabled for all users that have recently switched the language on MDN.
Use case 1: Preference for English
Charlie lives in France and uses French Google, but prefers to read MDN in English, so they enabled "Remember language" while browsing MDN in English.
preferredlocale=en-US
cookie, they now get redirected to English:Use case 2: Preference for translated language
Jin lives in South Korea and has basic English knowledge, but prefers to read MDN in Korean, their native language, so they enabled "Remember language" while browsing MDN in Korean.
intersection()
link.preferredlocale=ko
cookie and the page is available in Korean, they now get redirected to:Beta Was this translation helpful? Give feedback.
All reactions