summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-05-13 13:43:28 -0400
committerTim Graham <timograham@gmail.com>2013-05-13 13:47:40 -0400
commitcac0f7b72e5d42239803df5338db03f1d19c22e6 (patch)
treeafd76bed4b8a1217b89f6e8831525a56361ee0b4
parenta9703edc618d90d2e08122b481608e3dafc3ab63 (diff)
[1.5.x] Fixed #20398 - Added language selection code to example in documentation
Thanks ggbaker for the suggestion and Simeon Visser for the patch. Backport of 897e4eab65 from master
-rw-r--r--docs/topics/i18n/translation.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 6450cff367..a5cf9c1410 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1409,7 +1409,9 @@ Here's example HTML template code:
<select name="language">
{% get_language_info_list for LANGUAGES as 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 %}
</select>
<input type="submit" value="Go" />