diff options
author | mistic100 <mistic@piwigo.org> | 2014-07-02 08:12:16 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-07-02 08:12:16 +0000 |
commit | 78c98bd7ec26ea0f72c96c43b3287eea0ad2956e (patch) | |
tree | bf1851f4045b029127ae26d38edd6a3909e02cc5 /include/functions_mail.inc.php | |
parent | faa284333d1ad8d385da3b8aa3cef754183257d9 (diff) |
feature 3046: Add option "force_fallback" to load_language + clean code
git-svn-id: http://piwigo.org/svn/trunk@28913 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_mail.inc.php')
-rw-r--r-- | include/functions_mail.inc.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php index 4c572b665..ed1081713 100644 --- a/include/functions_mail.inc.php +++ b/include/functions_mail.inc.php @@ -308,8 +308,13 @@ function switch_lang_to($language) if (!empty($language_files)) { foreach ($language_files as $dirname => $files) - foreach ($files as $filename) - load_language($filename, $dirname, array('language'=>$language) ); + { + foreach ($files as $filename => $options) + { + $options['language'] = $language; + load_language($filename, $dirname, $options); + } + } } trigger_notify('loading_lang'); @@ -330,6 +335,7 @@ function switch_lang_to($language) /** * Switch back language pushed with switch_lang_to() function. * @see switch_lang_to() + * Language files are not reloaded */ function switch_lang_back() { |