Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #20398 - Added language selection code to example in documentation

Thanks ggbaker for the suggestion and Simeon Visser for the patch.
  • Loading branch information...
commit 897e4eab6531cdbaf27c1b2a6716c86eb6ee1f5d 1 parent b1f7467
Tim Graham authored May 13, 2013

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  docs/topics/i18n/translation.txt
4  docs/topics/i18n/translation.txt
@@ -1437,7 +1437,9 @@ Here's example HTML template code:
1437 1437
     <select name="language">
1438 1438
     {% get_language_info_list for LANGUAGES as languages %}
1439 1439
     {% for language in languages %}
1440  
-    <option value="{{ language.code }}">{{ language.name_local }} ({{ language.code }})</option>
  1440
+    <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
  1441
+        {{ language.name_local }} ({{ language.code }})
  1442
+    </option>
1441 1443
     {% endfor %}
1442 1444
     </select>
1443 1445
     <input type="submit" value="Go" />

0 notes on commit 897e4ea

Please sign in to comment.
Something went wrong with that request. Please try again.