diff options
author | Friendika <info@friendika.com> | 2011-09-21 16:00:17 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-09-21 16:00:17 -0700 |
commit | 542aa22eb94e0f20806552b83cec2e46cf3b6f1b (patch) | |
tree | 1964dcac5bd41d9049dc0abbca67fa552da710a2 /include/text.php | |
parent | 030e1e82c32a3061abf71ffb90e65f2b9197d8a4 (diff) | |
download | volse-hubzilla-542aa22eb94e0f20806552b83cec2e46cf3b6f1b.tar.gz volse-hubzilla-542aa22eb94e0f20806552b83cec2e46cf3b6f1b.tar.bz2 volse-hubzilla-542aa22eb94e0f20806552b83cec2e46cf3b6f1b.zip |
provide ability to unset session language
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php index 9ed6d23bf..37af65c70 100644 --- a/include/text.php +++ b/include/text.php @@ -847,10 +847,16 @@ function lang_selector() { $o .= '<form action="" method="post" ><select name="system_language" onchange="this.form.submit();" >'; $langs = glob('view/*/strings.php'); if(is_array($langs) && count($langs)) { + $langs[] = ''; if(! in_array('view/en/strings.php',$langs)) $langs[] = 'view/en/'; asort($langs); foreach($langs as $l) { + if($l == '') { + $default_selected = ((! x($_SESSION,'language')) ? ' selected="selected" ' : ''); + $o .= '<option value="" ' . $default_selected . '>' . t('default') . '</option>'; + continue; + } $ll = substr($l,5); $ll = substr($ll,0,strrpos($ll,'/')); $selected = (($ll === $lang) ? ' selected="selected" ' : ''); |