aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-07-07 12:54:44 +0000
committermistic100 <mistic@piwigo.org>2013-07-07 12:54:44 +0000
commitb1316542e4d1032f365c1011615d35370e3f35a8 (patch)
treecc790ecaad504f40b116da696dfc78aa2e2d8ffa /include/functions_mail.inc.php
parent92134bc10200f2528cb7c22e4a5ed17c3886c1e6 (diff)
bug:2939 switch_lang_to() must reload plugins files
git-svn-id: http://piwigo.org/svn/trunk@23823 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_mail.inc.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 7ad0b1853..74a7f17e1 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -192,7 +192,7 @@ function get_str_email_format($is_html)
*/
function switch_lang_to($language)
{
- global $switch_lang, $user, $lang, $lang_info;
+ global $switch_lang, $user, $lang, $lang_info, $language_files;
// explanation of switch_lang
// $switch_lang['language'] contains data of language
@@ -224,6 +224,14 @@ function switch_lang_to($language)
// No test admin because script is checked admin (user selected no)
// Translations are in admin file too
load_language('admin.lang', '', array('language'=>$language) );
+
+ if (!empty($language_files))
+ {
+ foreach ($language_files as $dirname => $files)
+ foreach ($files as $filename)
+ load_language($filename, $dirname, array('language'=>$language) );
+ }
+
trigger_action('loading_lang');
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR,
array('language'=>$language, 'no_fallback'=>true, 'local'=>true)