diff --git a/src/SupportedEntities.php b/src/SupportedEntities.php index 9bb86fd6..943e1f98 100644 --- a/src/SupportedEntities.php +++ b/src/SupportedEntities.php @@ -715,6 +715,22 @@ public static function getInfo() { if (!in_array($entity_info['civicrm entity name'], $api_entity_types)) { unset($civicrm_entity_info[$entity_type]); } + // Insert dblocale table names + $multilingual = \CRM_Core_I18n::isMultilingual(); + if ($multilingual) { + // @codingStandardsIgnoreStart + global $dbLocale; + // @codingStandardsIgnoreEnd + if ($dbLocale) { + $tables = \CRM_Core_I18n_Schema::schemaStructureTables(); + if (in_array($entity_type, $tables)) { + $locale_table_name = $entity_type . $dbLocale; + if (strlen($locale_table_name) <= 32) { + $civicrm_entity_info[$locale_table_name] = $entity_info; + } + } + } + } } return $civicrm_entity_info; }