Files
edx-platform/common/djangoapps/dark_lang/__init__.py
Sarina Canelake e485e5ee24 Dark language should stay set until explicitly cleared.
Adds a temporary user_preference key, DARK_LANGUAGE_KEY, to hold the user's dark lang preference.
This preference key is deleted when ?clear-lang is placed in query params.
2015-06-26 13:41:14 -04:00

23 lines
720 B
Python

"""
Language Translation Dark Launching
===================================
This app adds the ability to launch language translations that
are only accessible through the use of a specific query parameter
(and are not activated by browser settings).
Installation
------------
Add the ``DarkLangMiddleware`` to your list of ``MIDDLEWARE_CLASSES``.
It must come after the ``SessionMiddleware``, and before the ``LocaleMiddleware``.
Run migrations to install the configuration table.
Use the admin site to add a new ``DarkLangConfig`` that is enabled, and lists the
languages that should be released.
"""
# this is the UserPreference key for the currently-active dark language, if any
DARK_LANGUAGE_KEY = 'dark-lang'