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
- Language aware template loader by rmt 4 years, 1 month ago
- Multilingual Models by Archatas 6 years, 2 months ago
- Admin change language by garcia_marc 5 years ago
- Ignore HTTP Accept-Language headers by fonso 6 years ago
- Admin App/Model Custom Ordering by stephen_mcd 3 years, 3 months ago
Comments
This wouldn't work for me (Django 1.2.3) without adding
'django.middleware.locale.LocaleMiddleware',toMIDDLEWARE_CLASSES#