[REF] - Add helper function for the repetitive task of fetching multilingual
[civicrm-core.git] / CRM / Core / DAO / AllCoreTables.php
index 225f5530c236075f3b7a810f55b2533a437de7cb..5b9ffe5ef671d0e04d169fad4574684851530a57 100644 (file)
@@ -117,10 +117,8 @@ class CRM_Core_DAO_AllCoreTables {
    *   index definitions after localization
    */
   public static function multilingualize($class, $originalIndices) {
-    $domain = new CRM_Core_DAO_Domain();
-    $domain->find(TRUE);
-    $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
-    if (CRM_Utils_System::isNull($locales)) {
+    $locales = CRM_Core_I18n::getMultilingual();
+    if (!$locales) {
       return $originalIndices;
     }
     $classFields = $class::fields();