fsr-de / myHPI

Django/Wagtail page serving myhpi.de
https://myhpi.de
11 stars 11 forks source link

Store user language preference #559

Open frcroth opened 2 weeks ago

frcroth commented 2 weeks ago

I use an English system language but prefer myHPI in German. I would like to not have to switch to German everytime I visit the page.

E.g. the language preference could be stored in my browser.

jeriox commented 2 weeks ago

Django supports using a cookie for that: https://docs.djangoproject.com/en/5.0/topics/i18n/translation/#how-django-discovers-language-preference

frcroth commented 2 weeks ago

At what point do we need cookie banners?

jeriox commented 2 weeks ago

AFAIK not as long as we only store functional cookies that are required for the basic functionality of the site (e.g. we already store the session id as a cookie, otherwise you would be unable to login)