Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replacing hardcoded default domain with static property I18n::$defaul…
…tDomain
  • Loading branch information
ADmad committed Jan 9, 2012
1 parent 1f246d6 commit 08825e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Cake/I18n/I18n.php
Expand Up @@ -45,6 +45,13 @@ class I18n {
*/
public $l10n = null;

/**
* Default domain of translation
*
* @var string
*/
public static $defaultDomain = 'default';

/**
* Current domain of translation
*
Expand Down Expand Up @@ -149,7 +156,7 @@ public static function translate($singular, $plural = null, $domain = null, $cat
}

if (is_null($domain)) {
$domain = 'default';
$domain = self::$defaultDomain;
}

$_this->domain = $domain . '_' . $_this->l10n->lang;
Expand Down

0 comments on commit 08825e5

Please sign in to comment.