We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit eff15316 authored by tobyink's avatar tobyink

This pre-selection really needs to be in there. Otherwise it's impossible to...

This pre-selection really needs to be in there. Otherwise it's impossible to select English because the onchange Javascript event won't fire!
parent 6250d607
......@@ -56,6 +56,8 @@ $smarty->cache_dir = $install_path. '/cache/';
$current_lang = preg_replace('/.UTF-8/', '', $current_lang);
$smarty->assign('current_lang', $current_lang);
$smarty->assign('lang_selector_array',
array((isset($_GET['lang'])?$_GET['lang']:$_COOKIE['lang']) => 1));
$smarty->assign('base_url', $base_url);
$smarty->assign('this_page', $_SERVER['REQUEST_URI']);
$smarty->assign('this_page_absolute',
......
<form method='get' action=''>
<select name='lang' id='lang' onchange='this.form.submit()'>
<optgroup label="Please select your language">
<option value='en_US'>English (US)</option>
<option value='de_DE'>Deutsch (Deutschland)</option>
<option {if $lang_selector_array.en_US}selected="selected"{/if} value='en_US'>English (US)</option>
<option {if $lang_selector_array.de_DE}selected="selected"{/if} value='de_DE'>Deutsch (Deutschland)</option>
</optgroup>
</select>
<noscript>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment