From: Mathieu Lutfy Date: Mon, 2 Jun 2014 19:07:50 +0000 (-0400) Subject: CRM-14769: fix for i18n extensions and domain changes (do not change domain if using... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82bcff633cc7b8883f9a4aafeca28362164e5184;p=civicrm-core.git CRM-14769: fix for i18n extensions and domain changes (do not change domain if using en_US). --- diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index f34f5f3dc8..af6c536d55 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -251,7 +251,7 @@ class CRM_Core_I18n { // gettext domain for extensions $domain_changed = FALSE; - if (! empty($params['domain'])) { + if (! empty($params['domain']) && $this->_phpgettext) { if ($this->setGettextDomain($params['domain'])) { $domain_changed = TRUE; } @@ -400,6 +400,11 @@ class CRM_Core_I18n { * @return Boolean True if the domain was changed for an extension. */ function setGettextDomain($key) { + /* No domain changes for en_US */ + if (! $this->_phpgettext) { + return FALSE; + } + // It's only necessary to find/bind once if (! isset($this->_extensioncache[$key])) { $config = CRM_Core_Config::singleton();