Commit a4df1ae9 authored by Skia's avatar Skia
Browse files

Add language chooser

parent f2c3c7dc
...@@ -34,6 +34,16 @@ ...@@ -34,6 +34,16 @@
<div id="popupheader">{{ user.get_display_name() }}</div> <div id="popupheader">{{ user.get_display_name() }}</div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
<div id="language_chooser">
{% for language in LANGUAGES %}
<form action="{{ url('set_language') }}" method="post">{% csrf_token %}
<input name="language" value="{{ language[0] }}" type="hidden" />
<input type="submit" value="{{ language[1]}}" />
</form>
{% endfor %}
</div>
{% block nav %} {% block nav %}
{% if not popup %} {% if not popup %}
<nav> <nav>
......
...@@ -156,6 +156,11 @@ DATABASES = { ...@@ -156,6 +156,11 @@ DATABASES = {
LANGUAGE_CODE = 'fr-FR' LANGUAGE_CODE = 'fr-FR'
LANGUAGES = [
('en', _('English')),
('fr', _('French')),
]
TIME_ZONE = 'Europe/Paris' TIME_ZONE = 'Europe/Paris'
USE_I18N = True USE_I18N = True
......
...@@ -33,5 +33,6 @@ urlpatterns = [ ...@@ -33,5 +33,6 @@ urlpatterns = [
url(r'^api/v1/', include('api.urls', namespace="api", app_name="api")), url(r'^api/v1/', include('api.urls', namespace="api", app_name="api")),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
url(r'^ajax_select/', include(ajax_select_urls)), url(r'^ajax_select/', include(ajax_select_urls)),
url(r'^i18n/', include('django.conf.urls.i18n')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # TODO: remove me for production!!! ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # TODO: remove me for production!!!
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment