Skip to content
Force Django Admin to show in one selected language
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
forceadminlanguage
.gitignore
README.md
setup.py

README.md

Force Admin Language Middleware

Force Django Admin to show in one selected language.

Installation

pip install django-forceadminlanguage

or

pip install git+git://github.com/Brick85/django_forceadminlanguage.git

Usage

MIDDLEWARE_CLASSES = (
    ...
    'forceadminlanguage.middleware.ForceAdminLanguageMiddleware',
    ...
)
ADMIN_LANGUAGE_CODE = 'en'

Additional Settings

ADMIN_LANGUAGE_IGNORE_PATH

If requests starts with this path admin language shouldn't be forced. Example:

# won't force English if French is manually requested.
ADMIN_LANGUAGE_IGNORE_PATH = '/fr/'
Something went wrong with that request. Please try again.