Skip to content
Permalink
Browse files

Replacing hardcoded default domain with static property I18n::$defaul…

…tDomain
  • Loading branch information...
ADmad committed Nov 10, 2011
1 parent 1f246d6 commit 08825e54b7c3b58316c2451e5598d32fbfd0097a
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/Cake/I18n/I18n.php
@@ -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 @@ 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;

0 comments on commit 08825e5

Please sign in to comment.
You can’t perform that action at this time.