Changeset 486 for trunk/system/core/Kohana.php
- Timestamp:
- 09/03/2007 08:49:02 PM (15 months ago)
- Files:
-
- 1 modified
-
trunk/system/core/Kohana.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Kohana.php
r475 r486 428 428 } 429 429 430 public static function lang($type = FALSE, $name = TRUE)430 public static function lang($type) 431 431 { 432 432 static $found = array(); 433 433 434 // Throw an exception if the type is not specified 435 if ($type == FALSE) 436 throw new Kohana_Exception('A language message type must be used when calling <code>Kohan::lang()</code>.'); 434 if (strpos($type, '.') !== FALSE) 435 { 436 list ($type, $name) = explode('.', $type); 437 } 438 else 439 { 440 $name = TRUE; 441 } 437 442 438 443 if ( ! isset($found[$type])) … … 531 536 protected $code = 0; 532 537 533 534 538 function __construct($error) 535 539 { 536 540 // Fetch the error message 537 $message = Kohana::lang('exceptions ',$error);541 $message = Kohana::lang('exceptions.'.$error); 538 542 539 543 // Handle error messages that are not set
