I have a django 1.6 site with i18n working. I can change the frontend language with a select box in the top of the template, but I don't know if there is a django app or trick to change the admin language, because it seems to store somewhere in session variable, and it keeps the first language I have used in the frontend.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
In your settings.py just add
'django.middleware.locale.LocaleMiddleware'
to yourMIDDLEWARE_CLASSES
setting, making sure it appears after'django.contrib.sessions.middleware.SessionMiddleware'
.You can create
/en/admin
,/fr/admin/
and so on usingi18n_patterns
:(For Django <= 1.7, you must specify a prefix, use
i18n_patterns('', ... )
)