[Customisation Database Commits] r141 - /trunk/titania/includes/class_titania.php

David Lewis highwayoflife at phpbb.com
Sat Nov 8 20:15:21 CET 2008


Author: HighwayofLife
Date: Sat Nov  8 20:15:20 2008
New Revision: 141

Log:
- [feature] Added the ability to include a phpBB language file within Titania.

Modified:
    trunk/titania/includes/class_titania.php

Modified: trunk/titania/includes/class_titania.php
==============================================================================
*** trunk/titania/includes/class_titania.php (original)
--- trunk/titania/includes/class_titania.php Sat Nov  8 20:15:20 2008
***************
*** 241,245 ****
  			'S_SUCCESS'	=> ($error_type == ERROR_SUCCESS) ? true : false,
  		));
  	}
- }
  
--- 241,262 ----
  			'S_SUCCESS'	=> ($error_type == ERROR_SUCCESS) ? true : false,
  		));
  	}
  
+ 	/**
+ 	 * Add a phpBB language file
+ 	 *
+ 	 * @param mixed $lang_set
+ 	 * @param bool $use_db
+ 	 * @param bool $use_help
+ 	 */
+ 	public static function add_phpbb_lang($lang_set, $use_db = false, $use_help = false)
+ 	{
+ 		global $user;
+ 
+ 		$user->set_custom_lang_path(PHPBB_ROOT_PATH . 'language');
+ 
+ 		$user->add_lang($lang_set, $use_db, $use_help);
+ 
+ 		$user->set_custom_lang_path(TITANIA_ROOT . 'language');
+ 	}
+ }




More information about the customisationdb-commits mailing list