aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/language_switch/icons/cz_CZ.gifbin0 -> 903 bytes
-rw-r--r--plugins/language_switch/language_switch.inc.php14
2 files changed, 9 insertions, 5 deletions
diff --git a/plugins/language_switch/icons/cz_CZ.gif b/plugins/language_switch/icons/cz_CZ.gif
new file mode 100644
index 000000000..89686c417
--- /dev/null
+++ b/plugins/language_switch/icons/cz_CZ.gif
Binary files differ
diff --git a/plugins/language_switch/language_switch.inc.php b/plugins/language_switch/language_switch.inc.php
index 2a5c37dbc..11a4c4ddd 100644
--- a/plugins/language_switch/language_switch.inc.php
+++ b/plugins/language_switch/language_switch.inc.php
@@ -27,6 +27,7 @@ function language_switch()
{
global $user, $template, $conf, $lang;
if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
+ $same = $user['language'];
if ( isset( $_GET['lang']) )
{
if ( !empty($_GET['lang'] ) and
@@ -56,12 +57,15 @@ function language_switch()
{
$user['language'] = $_COOKIE['pwg_lang_switch'];
}
-
- load_language('common.lang', '', $user['language']);
- load_language('local.lang', '', $user['language']);
- if (defined('IN_ADMIN') and IN_ADMIN)
+// Reload language only if it isn't the same one
+ if ( $same !== $user['language'])
{
- load_language('admin.lang', '', $user['language']);
+ load_language('common.lang', '', $user['language']);
+ load_language('local.lang', '', $user['language']);
+ if (defined('IN_ADMIN') and IN_ADMIN)
+ {
+ load_language('admin.lang', '', $user['language']);
+ }
}
}
//if ( isset( $_GET['lang']) ) { redirect( make_index_url() ); }