1 [%- IF ctx.locales.keys.size > 1;
3 # Ensure the context locale is in xx_yy format
4 base_locale = ctx.locale FILTER lower;
5 base_locale = base_locale.replace('-','_');
7 set_locale = CGI.param('set_eg_locale') || CGI.cookie('eg_locale') || base_locale;
9 <form id="pref_locale_picker_form" class="row" action="[% mkurl() %]" method="post">
10 <label for="pref_locale_picker" class="color_4 light_border col-3 text-left">[% l("Language:") %]</label>
11 [%- FOREACH param IN CGI.params(); -%]
12 [%- NEXT IF param.key == 'set_eg_locale'; -%]
13 <input type="hidden" name="[% param.key | html %]" value="[% param.value | html %]" />
16 <select id="pref_locale_picker" name="set_eg_locale" class="form-control form-control-sm col-6">
17 [%- FOREACH locale IN ctx.locales.keys %]
18 [%- IF set_locale == locale;
19 selected = 'selected="selected"';
24 <option value="[% locale | html %]" [% selected %]>[% ctx.locales.$locale | html %]</option>
28 <button type="submit" class="btn btn-sm btn-confirm float-right"/><i class="fas fa-save" aria-hidden="true"></i>[% l(" Save Changes") %]</button>