mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user