1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 05:07:27 +02:00

e107:lan() improvements

This commit is contained in:
SecretR
2012-12-20 12:06:28 +02:00
parent 9730d2b645
commit 94c9f41071

View File

@@ -2198,20 +2198,21 @@ class e107
* @example e107::lan('gallery'); // Loads e_PLUGIN."gallery/languages/English.php (if English is the current language) * @example e107::lan('gallery'); // Loads e_PLUGIN."gallery/languages/English.php (if English is the current language)
* @example e107::lan('gallery',e_LANGUAGE."_something.php"); // Loads e_PLUGIN."gallery/languages/English_something.php (if English is the current language) * @example e107::lan('gallery',e_LANGUAGE."_something.php"); // Loads e_PLUGIN."gallery/languages/English_something.php (if English is the current language)
*/ */
public static function lan($type,$fname = null,$options = null) public static function lan($type, $fname = null, $options = null)
{ {
$options = $options ? true : false;
switch ($type) switch ($type)
{ {
case 'core' : case 'core' :
self::coreLan($fname,$options); self::coreLan($fname, $options);
break; break;
case 'theme' : case 'theme' :
self::themeLan($fname, null); self::themeLan($fname, null, $options);
break; break;
default : default :
$opt = ($options === true) ? true : false;
self::plugLan($type,$fname, $opt); self::plugLan($type, $fname, $options);
break; break;
} }