Replacing hardcoded default domain with static property I18n::$defaultDomain

This commit is contained in:
ADmad 2011-11-11 01:46:21 +05:30
parent 1f246d61ca
commit 08825e54b7

View file

@ -45,6 +45,13 @@ class I18n {
*/
public $l10n = null;
/**
* Default domain of translation
*
* @var string
*/
public static $defaultDomain = 'default';
/**
* Current domain of translation
*
@ -149,7 +156,7 @@ class I18n {
}
if (is_null($domain)) {
$domain = 'default';
$domain = self::$defaultDomain;
}
$_this->domain = $domain . '_' . $_this->l10n->lang;