Changeset 23823


Ignore:
Timestamp:
Jul 7, 2013, 2:54:44 PM (11 years ago)
Author:
mistic100
Message:

bug:2939 switch_lang_to() must reload plugins files

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r23384 r23823  
    12101210    $options = array() )
    12111211{
    1212   global $user;
     1212  global $user, $language_files;
     1213 
     1214  if ( !empty($dirname) and !empty($filename) )
     1215  {
     1216    if ( empty($language_files[$dirname]) or !in_array($filename,$language_files[$dirname]) )
     1217    {
     1218      $language_files[$dirname][] = $filename;
     1219    }
     1220  }
    12131221
    12141222  if (! @$options['return'] )
  • trunk/include/functions_mail.inc.php

    r19703 r23823  
    193193function switch_lang_to($language)
    194194{
    195   global $switch_lang, $user, $lang, $lang_info;
     195  global $switch_lang, $user, $lang, $lang_info, $language_files;
    196196
    197197  // explanation of switch_lang
     
    225225    // Translations are in admin file too
    226226    load_language('admin.lang', '', array('language'=>$language) );
     227   
     228    if (!empty($language_files))
     229    {
     230      foreach ($language_files as $dirname => $files)
     231        foreach ($files as $filename)
     232          load_language($filename, $dirname, array('language'=>$language) );
     233    }
     234   
    227235    trigger_action('loading_lang');
    228236    load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR,
Note: See TracChangeset for help on using the changeset viewer.