diff options
| author | Tim Graham <timograham@gmail.com> | 2013-05-13 13:43:28 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-05-13 13:47:40 -0400 |
| commit | cac0f7b72e5d42239803df5338db03f1d19c22e6 (patch) | |
| tree | afd76bed4b8a1217b89f6e8831525a56361ee0b4 | |
| parent | a9703edc618d90d2e08122b481608e3dafc3ab63 (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.txt | 4 |
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" /> |
