language switcher in admin

1
2
3
4
5
6
7
8
9
<form action="/i18n/setlang/" method="post">
                <select name="language">
                {% for lang in LANGUAGES %}
                <option value="{{ lang.0 }}" {% ifequal lang.0 request.LANGUAGE_CODE           %}selected="yes"
                {% endifequal %}>{{ lang.1 }}</option>
                {% endfor %}
                </select>
                <input type="submit" value="Go" />
            </form>

More like this

  1. Language aware template loader by rmt 4 years, 1 month ago
  2. Multilingual Models by Archatas 6 years, 2 months ago
  3. Admin change language by garcia_marc 5 years ago
  4. Ignore HTTP Accept-Language headers by fonso 6 years ago
  5. Admin App/Model Custom Ordering by stephen_mcd 3 years, 2 months ago

Comments

simon_w (on November 29, 2010):

This wouldn't work for me (Django 1.2.3) without adding 'django.middleware.locale.LocaleMiddleware', to MIDDLEWARE_CLASSES

#

(Forgotten your password?)