<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
*
* @param $locale string the base of this certain object's existence
*
- * @return void
+ * @return \CRM_Core_I18n
*/
function __construct($locale) {
if ($locale != '' and $locale != 'en_US') {
// 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;
}
* @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();