1
0
mirror of https://github.com/django/django.git synced 2025-06-05 11:39:13 +00:00

Updated indentation of example template in docs/topics/i18n/translation.txt.

This commit is contained in:
Wim Feijen 2015-06-22 10:58:38 +02:00 committed by Tim Graham
parent f1635ba433
commit 514b69cb9e

View File

@ -1738,20 +1738,20 @@ Here's example HTML template code:
.. code-block:: html+django .. code-block:: html+django
{% load i18n %} {% load i18n %}
<form action="{% url 'set_language' %}" method="post">
{% csrf_token %} <form action="{% url 'set_language' %}" method="post">{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" /> <input name="next" type="hidden" value="{{ redirect_to }}" />
<select name="language"> <select name="language">
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %} {% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %} {% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %} {% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}> <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }}) {{ language.name_local }} ({{ language.code }})
</option> </option>
{% endfor %} {% endfor %}
</select> </select>
<input type="submit" value="Go" /> <input type="submit" value="Go" />
</form> </form>
In this example, Django looks up the URL of the page to which the user will be In this example, Django looks up the URL of the page to which the user will be