Show current lang in UI, and add URL properly
parent
5cd5260c0b
commit
72d953be48
|
@ -79,12 +79,18 @@
|
|||
|
||||
<hr>
|
||||
|
||||
{% get_current_language as current_lang %}
|
||||
<form action="/i18n/setlang/" method="post">{% csrf_token %}
|
||||
<input name="next" type="hidden" value="/" />
|
||||
{% csrf_token %}
|
||||
<select style="float: left; height: 33px;" name="language">
|
||||
{% for lang in LANGUAGES %}
|
||||
{% if lang.0 == current_lang %}
|
||||
<option selected="selected" value="{{ lang.0 }}">{{ lang.0|language_name_local }} [{{ lang.1 }}]</option>
|
||||
{% else %}
|
||||
<option value="{{ lang.0 }}">{{ lang.0|language_name_local }} [{{ lang.1 }}]</option>
|
||||
{% endif %}
|
||||
}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input style="float: left; height: 33px; margin: 0px;" type="submit" value="Change Language" name="submit">
|
||||
|
|
|
@ -62,6 +62,7 @@ urlpatterns = patterns(
|
|||
'core.views.serve_single_version_docs',
|
||||
name='docs_detail'),
|
||||
|
||||
url(r'^i18n/', include('django.conf.urls.i18n')),
|
||||
url(r'^projects/', include('projects.urls.public')),
|
||||
url(r'^builds/', include('builds.urls')),
|
||||
url(r'^flagging/', include('basic.flagging.urls')),
|
||||
|
|
Loading…
Reference in New Issue