mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Add language chooser
This commit is contained in:
parent
f2c3c7dc25
commit
a4df1ae9a5
@ -34,6 +34,16 @@
|
||||
<div id="popupheader">{{ user.get_display_name() }}</div>
|
||||
{% endif %}
|
||||
{% 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 %}
|
||||
{% if not popup %}
|
||||
<nav>
|
||||
|
@ -156,6 +156,11 @@ DATABASES = {
|
||||
|
||||
LANGUAGE_CODE = 'fr-FR'
|
||||
|
||||
LANGUAGES = [
|
||||
('en', _('English')),
|
||||
('fr', _('French')),
|
||||
]
|
||||
|
||||
TIME_ZONE = 'Europe/Paris'
|
||||
|
||||
USE_I18N = True
|
||||
|
@ -33,5 +33,6 @@ urlpatterns = [
|
||||
url(r'^api/v1/', include('api.urls', namespace="api", app_name="api")),
|
||||
url(r'^admin/', include(admin.site.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!!!
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user