set_lang.html 983 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div id="lang_sub">
    <form method="post" action="/language">
        <fieldset>
            <div>
                <select id="id_setlang" name="set_lang">
                    {% for domain, display in languages.items() %}
                    <option
                        value="{{ domain }}"
                        {% if language == domain %}
                        selected="selected"
                        {% endif %}
                    >
                        {{ display }}
                    </option>
                    {% endfor %}
                </select>

                <!-- Pass our current url path as next. -->
                <input type="hidden" name="next" value="{{ request.url.path }}">

                <!-- Pass query_params over to /language via POST. -->
                <input type="hidden" name="q" value="{{ request.query_params }}">

                <input type="submit" value="Go">
            </div>
        </fieldset>
    </form>
</div>