+# -*- coding: utf-8 -*-
# Django settings for wolnelektury project.
from os import path
gettext = lambda s: s
LANGUAGES = tuple(sorted([
- ('pl', gettext('Polish')),
- ('de', gettext('German')),
- ('en', gettext('English')),
- ('lt', gettext('Lithuanian')),
- ('fr', gettext('French')),
- ('ru', gettext('Russian')),
- ('es', gettext('Spanish')),
- ('uk', gettext('Ukrainian')),
+ ('pl', u'Polski'),
+ ('de', u'Deutsch'),
+ ('en', u'English'),
+ ('lt', u'Lietuvių'),
+ ('fr', u'Français'),
+ ('ru', u'Русский'),
+ ('es', u'Español'),
+ ('uk', u'Українська'),
], key=lambda x: x[0]))
<form action="{% url django.views.i18n.set_language %}" method="POST">
{% spaceless %}
{% for lang in LANGUAGES %}
- <button type="submit" name="language"
+ <button type="submit" name="language" title="{{ lang.1 }}"
class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %} {% if forloop.last %}last{% endif %}"
value="{{ lang.0 }}">{{ lang.0|upper }}</button>
{% endfor %}