Experiment: Remember language 🧪 #739
caugner
announced in
Announcements
Replies: 25 comments 13 replies
-
|
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.
2 replies
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
preferredlocalecookie, 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-UScookie, 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=kocookie and the page is available in Korean, they now get redirected to:Beta Was this translation helpful? Give feedback.
All reactions