aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/language_switch/language_switch.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-03-28 13:51:43 +0000
committerplegall <plg@piwigo.org>2011-03-28 13:51:43 +0000
commite405136d474fa90c3e9b6467cd8d541aa1c9d1ac (patch)
tree8d5a0c2b751b6550ba5af4853a805c88088c2a55 /plugins/language_switch/language_switch.inc.php
parent18878f8bb0bb23403772504ab4d94a34c85ecaf4 (diff)
Language Switch:
* display language name next to flag (and enlarge the flag box to ~400px) * force the links color inside the language box because the background color is forced : on a theme like "grum dark II", the result is really awful, impossible to read. * the current language is not removed from the list, this ways the list is not reorganized depending on the current language git-svn-id: http://piwigo.org/svn/trunk@9906 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/language_switch/language_switch.inc.php')
-rw-r--r--plugins/language_switch/language_switch.inc.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/language_switch/language_switch.inc.php b/plugins/language_switch/language_switch.inc.php
index 721a5af11..c24fcd1a8 100644
--- a/plugins/language_switch/language_switch.inc.php
+++ b/plugins/language_switch/language_switch.inc.php
@@ -70,11 +70,16 @@ class language_controler {
'url' => str_replace(array('=&amp;','?&amp;'),array('&amp;','?'),
add_url_params( $url_starting, array('lang'=> $code) )),
'alt' => ucwords( $displayname ),
+ 'title' => substr($displayname, 0, -4), // remove [FR] or [RU]
'img' => get_root_url().'language/' . $code . '/' . $code . '.jpg',
);
- if ( $code !== $user['language'] )
- $lsw['flags'][$code] = $qlc ;
- else $lsw['Active'] = $qlc;
+
+ $lsw['flags'][$code] = $qlc ;
+
+ if ($code == $user['language'])
+ {
+ $lsw['Active'] = $qlc;
+ }
}
$template->set_filename('language_flags', dirname(__FILE__) . '/flags.tpl');
$lsw['side'] = ceil(sqrt(count($available_lang)));