diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-06 11:35:01 -0800 | 
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-06 11:35:01 -0800 | 
| commit | a74fd27e5f238f91f39be14056692945eecedabc (patch) | |
| tree | 6a4a3311536500b06178d5a8c620263b0130d3ea /system/libraries/I18n.php | |
| parent | 7778d4c05075e67f096d3d5365e5ae35e1b0a737 (diff) | |
Updated Kohana to r4737
Diffstat (limited to 'system/libraries/I18n.php')
| -rw-r--r-- | system/libraries/I18n.php | 45 | 
1 files changed, 21 insertions, 24 deletions
| diff --git a/system/libraries/I18n.php b/system/libraries/I18n.php index 96752e51..9401ddcd 100644 --- a/system/libraries/I18n.php +++ b/system/libraries/I18n.php @@ -2,35 +2,12 @@  /**   * Kohana I18N System   * - * $Id: I18n.php 4679 2009-11-10 01:45:52Z isaiah $ - * - * @package    Cache + * @package    Kohana   * @author     Kohana Team   * @copyright  (c) 2007-2009 Kohana Team   * @license    http://kohanaphp.com/license   */ -/** - * Loads the configured driver and validates it. - * - * @param   string  Text to output - * @param   array   Key/Value pairs of arguments to replace in the string - * @return  string  Translated text - */ -function __($string, $args = NULL) -{ -	// KOHANA_LOCALE is the default locale, in which all of Kohana's __() calls are written in -	if (I18n::get_locale() != Kohana::LOCALE) -	{ -		$string = I18n::get_text($string); -	} - -	if ($args === NULL) -		return $string; - -	return strtr($string, $args); -} -  class I18n_Core  {  	protected static $locale; @@ -99,5 +76,25 @@ class I18n_Core  		else  			return $string;  	} +} +/** + * Loads the configured driver and validates it. + * + * @param   string  Text to output + * @param   array   Key/Value pairs of arguments to replace in the string + * @return  string  Translated text + */ +function __($string, $args = NULL) +{ +	// KOHANA_LOCALE is the default locale, in which all of Kohana's __() calls are written in +	if (I18n::get_locale() != Kohana::LOCALE) +	{ +		$string = I18n::get_text($string); +	} + +	if ($args === NULL) +		return $string; + +	return strtr($string, $args);  } | 
