From 82bcff633cc7b8883f9a4aafeca28362164e5184 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Mon, 2 Jun 2014 15:07:50 -0400 Subject: [PATCH] CRM-14769: fix for i18n extensions and domain changes (do not change domain if using en_US). --- CRM/Core/I18n.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); -- 2.25.1