mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-01 15:19:46 +00:00
Replacing hardcoded default domain with static property I18n::$defaultDomain
This commit is contained in:
parent
1f246d61ca
commit
08825e54b7
1 changed files with 8 additions and 1 deletions
|
@ -45,6 +45,13 @@ class I18n {
|
||||||
*/
|
*/
|
||||||
public $l10n = null;
|
public $l10n = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default domain of translation
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public static $defaultDomain = 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current domain of translation
|
* Current domain of translation
|
||||||
*
|
*
|
||||||
|
@ -149,7 +156,7 @@ class I18n {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($domain)) {
|
if (is_null($domain)) {
|
||||||
$domain = 'default';
|
$domain = self::$defaultDomain;
|
||||||
}
|
}
|
||||||
|
|
||||||
$_this->domain = $domain . '_' . $_this->l10n->lang;
|
$_this->domain = $domain . '_' . $_this->l10n->lang;
|
||||||
|
|
Loading…
Add table
Reference in a new issue