mirror of
https://github.com/django/django.git
synced 2025-08-05 19:38:21 +00:00
Fixed #20398 - Added language selection code to example in documentation
Thanks ggbaker for the suggestion and Simeon Visser for the patch.
This commit is contained in:
parent
b1f74670cc
commit
897e4eab65
1 changed files with 3 additions and 1 deletions
|
@ -1437,7 +1437,9 @@ Here's example HTML template code:
|
||||||
<select name="language">
|
<select name="language">
|
||||||
{% 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 }}">{{ language.name_local }} ({{ language.code }})</option>
|
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
|
||||||
|
{{ language.name_local }} ({{ language.code }})
|
||||||
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Go" />
|
<input type="submit" value="Go" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue