7π
β
-
See How to override a view from an external Django app -> How to override without forking -> Overriding a view to make βi18n.set_language() to store the language into an eventually available user profileβ
-
Copy django-user-accounts middleware and change
get_language_for_user
. -
Place the middleware after
django.middleware.locale.LocaleMiddleware
, because this sets the default language based on the request so thatβs still useful for anonymous visitors, so you want this executed before your own middleware.
π€jpic
Source:stackexchange.com