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
- Admin change language by garcia_marc 4 years ago
- Admin App/Model Custom Ordering by stephen_mcd 2 years, 2 months ago
- Admin Apps Names Translation by Nad/ 2 years, 3 months ago
- Language aware template loader by rmt 3 years, 1 month ago
- pygments stylize by mgiger 4 years, 9 months ago
Comments
This wouldn't work for me (Django 1.2.3) without adding
'django.middleware.locale.LocaleMiddleware',toMIDDLEWARE_CLASSES#