mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +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;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
|
Loading…
Add table
Reference in a new issue