[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1460] This pre-selection really needs to be in there.
From: |
Toby Inkster |
Subject: |
[Librefm-commits] [1460] This pre-selection really needs to be in there. |
Date: |
Sun, 10 May 2009 09:32:47 +0000 |
Revision: 1460
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1460
Author: tobyink
Date: 2009-05-10 09:32:46 +0000 (Sun, 10 May 2009)
Log Message:
-----------
This pre-selection really needs to be in there. Otherwise it's impossible to
select English because the onchange Javascript event won't fire!
Modified Paths:
--------------
trunk/nixtape/templating.php
trunk/nixtape/themes/librefm/templates/language-selector.tpl
Modified: trunk/nixtape/templating.php
===================================================================
--- trunk/nixtape/templating.php 2009-05-10 04:04:52 UTC (rev 1459)
+++ trunk/nixtape/templating.php 2009-05-10 09:32:46 UTC (rev 1460)
@@ -56,6 +56,8 @@
$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',
Modified: trunk/nixtape/themes/librefm/templates/language-selector.tpl
===================================================================
--- trunk/nixtape/themes/librefm/templates/language-selector.tpl
2009-05-10 04:04:52 UTC (rev 1459)
+++ trunk/nixtape/themes/librefm/templates/language-selector.tpl
2009-05-10 09:32:46 UTC (rev 1460)
@@ -1,8 +1,8 @@
<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>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1460] This pre-selection really needs to be in there.,
Toby Inkster <=