- Timestamp:
- Mar 21, 2010, 12:14:30 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/about.php
r5196 r5208 40 40 41 41 /** 42 * set in ./l anguage/en_UK.iso-8859-1/local.lang.php (maybe to create)42 * set in ./local/language/en_UK.lang.php (maybe to create) 43 43 * for example for clear theme: 44 44 $lang['Theme: clear'] = 'This is the clear theme based on yoga template. '. -
trunk/include/common.inc.php
r5196 r5208 137 137 } 138 138 trigger_action('loading_lang'); 139 load_language('l ocal.lang', '', array('no_fallback'=>true) );139 load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) ); 140 140 141 141 // only now we can set the localized username of the guest user (and not in -
trunk/include/config_default.inc.php
r5196 r5208 475 475 // better performance. 476 476 $conf['template_compile_check'] = true; 477 478 // This forces Smarty to (re)compile templates on every invocation. This is 479 // handy for development and debugging. It should never be used in a 480 // production environment. 481 $conf['template_force_compile'] = false; 477 482 478 483 // this permit to show the php errors reporting (see INI 'error_reporting' -
trunk/include/functions.inc.php
r5200 r5208 584 584 load_language('common.lang'); 585 585 trigger_action('loading_lang'); 586 load_language('l ocal.lang', '', array('no_fallback'=>true) );586 load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) ); 587 587 $template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme()); 588 588 } … … 1169 1169 * target_charset - 1170 1170 * no_fallback - the language must be respected 1171 * local - if true, get local language file 1171 1172 * @return boolean success status or a string if options['return'] is true 1172 1173 */ … … 1218 1219 foreach ($languages as $language) 1219 1220 { 1220 $f = $dirname.$language.'/'.$filename; 1221 $f = @$options['local'] ? 1222 $dirname.$language.'.'.$filename: 1223 $dirname.$language.'/'.$filename; 1224 1221 1225 if (file_exists($f)) 1222 1226 { -
trunk/include/functions_mail.inc.php
r5196 r5208 256 256 load_language('admin.lang', '', array('language'=>$language) ); 257 257 trigger_action('loading_lang'); 258 load_language('local.lang', '', array('language'=>$language, 'no_fallback'=>true)); 258 load_language('lang', PHPWG_ROOT_PATH.'local/', 259 array('language'=>$language, 'no_fallback'=>true, 'local'=>true) 260 ); 259 261 260 262 $switch_lang['language'][$language]['lang_info'] = $lang_info; -
trunk/include/template.class.php
r5196 r5208 50 50 $this->smarty = new Smarty; 51 51 $this->smarty->debugging = $conf['debug_template']; 52 $this->smarty->compile_check=$conf['template_compile_check']; 52 $this->smarty->compile_check = $conf['template_compile_check']; 53 $this->smarty->force_compile = $conf['template_force_compile']; 53 54 54 55 $compile_dir = $conf['local_data_dir'].'/templates_c'; … … 71 72 $this->smarty->template_dir = array(); 72 73 if ( !empty($theme) ) 74 { 73 75 $this->set_theme($root, $theme, $path); 76 $this->set_prefilter( 'header', array('Template', 'prefilter_local_css') ); 77 } 74 78 else 75 79 $this->set_template_dir($root); … … 546 550 return $source; 547 551 } 552 553 static function prefilter_local_css($source, &$smarty) 554 { 555 $css = array(); 556 557 foreach ($smarty->get_template_vars('themes') as $theme) 558 { 559 if (file_exists(PHPWG_ROOT_PATH.'local/css/'.$theme['id'].'-rules.css')) 560 { 561 array_push($css, '<link rel="stylesheet" type="text/css" href="{$ROOT_URL}local/css/'.$theme['id'].'-rules.css">'); 562 } 563 } 564 if (file_exists(PHPWG_ROOT_PATH.'local/css/rules.css')) 565 { 566 array_push($css, '<link rel="stylesheet" type="text/css" href="{$ROOT_URL}local/css/rules.css">'); 567 } 568 569 if (!empty($css)) 570 { 571 $source = str_replace("\n</head>", "\n".implode( "\n", $css )."\n</head>", $source); 572 } 573 574 return $source; 575 } 548 576 } 549 577 -
trunk/nbm.php
r5196 r5208 35 35 // Need to update a second time 36 36 trigger_action('loading_lang'); 37 load_language('l ocal.lang', '', array('no_fallback'=>true) );37 load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) ); 38 38 39 39 -
trunk/plugins/language_switch/language_switch.inc.php
r5196 r5208 50 50 if ( $same !== $user['language']) { 51 51 load_language('common.lang', '', array('language'=>$user['language']) ); 52 load_language('local.lang', '', array('language'=>$user['language'], 'no_fallback'=>true) ); 52 load_language('lang', PHPWG_ROOT_PATH.'local/', 53 array('language'=>$user['language'], 'no_fallback'=>true, 'local'=>true) 54 ); 53 55 if (defined('IN_ADMIN') and IN_ADMIN) { // Never currently 54 56 load_language('admin.lang', '', array('language'=>$user['language']) );
Note: See TracChangeset
for help on using the changeset viewer.