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
This commit is contained in:
mistic100
2014-07-02 08:12:16 +00:00
parent faa284333d
commit 78c98bd7ec
2 changed files with 65 additions and 66 deletions
+8 -2
View File
@@ -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()
{