Write language to response cookie as writing to session is depricated
Created by: MagdaN
Problem: https://docs.djangoproject.com/en/4.0/releases/3.0/#miscellaneous:
Because accessing the language in the session rather than in the cookie is deprecated, LocaleMiddleware no longer looks for the user’s language in the session
Code from here: https://github.com/django/django/blob/main/django/views/i18n.py#L54