greasyfork-org / greasyfork

An online repository of user scripts.
https://greasyfork.org
GNU General Public License v3.0
1.44k stars 435 forks source link

Language change not added to cookies #1300

Closed d-patyk closed 1 month ago

d-patyk commented 1 month ago

Steps to reproduce:

  1. Open site (https://greasyfork.org/)
  2. Change language to some other
  3. Open site again in new tab (https://greasyfork.org/)
  4. Language was reset.

Solution: store chosen language in cookies, and when visiting https://greasyfork.org/, not https://greasyfork.org/LANGUAGE-CODE, set language stored in cookies.

JasonBarnabe commented 1 month ago

Language is controlled by three factors:

  1. If you explicitly choose a language from the dropdown, then you switch languages, and all links (should) maintain this switch. If you open a new tab, this is not maintained.
  2. If you're logged in, it will use the language set in your profile. This defaults to the language you were using when you registered.
  3. Your browser's language settings.

I don't see the need to complicate this further with cookies. Either log in (and choose the proper language in your profile) or configure your browser to match your language preferences.