Skip to content

Commit

Permalink
Fix isMultilingual to use static caching and respect current domain
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jun 18, 2020
1 parent 19b6cf4 commit 864c22c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CRM/Core/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,15 +584,14 @@ public function setGettextDomain($key) {
}

/**
* Is the CiviCRM in multilingual mode.
* Is the current CiviCRM domain in multilingual mode.
*
* @return Bool
* True if CiviCRM is in multilingual mode.
*/
public static function isMultilingual() {
$domain = new CRM_Core_DAO_Domain();
$domain->find(TRUE);
return (bool) $domain->locales;
$domainId = CRM_Core_Config::domainID();
return (bool) CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain', $domainId, 'locales');
}

/**
Expand Down

0 comments on commit 864c22c

Please sign in to comment.