Search kit: Display join name as part of default label
[civicrm-core.git] / setup / plugins / installDatabase / SetLanguage.civi-setup.php
index 62543fd29c7a9e566a83598722f3f0adf337ecb3..0da89b6b890ce177a31481c8065289b713dcd154 100644 (file)
@@ -14,5 +14,11 @@ if (!defined('CIVI_SETUP')) {
     if ($e->getModel()->lang) {
       \Civi\Setup::log()->info('[SetLanguage.civi-setup.php] Set default language to ' . $e->getModel()->lang);
       \Civi::settings()->set('lcMessages', $e->getModel()->lang);
+
+      // Ensure that post-install messages are displayed in the new locale.
+      // Note: This arguably shouldn't be necessary since `$tsLocale` is generally setup before installation,
+      // but it may get trampled during bootstrap.
+      $domain = CRM_Core_BAO_Domain::getDomain();
+      \CRM_Core_BAO_ConfigSetting::applyLocale(\Civi::settings($domain->id), $domain->locales);
     }
   }, \Civi\Setup::PRIORITY_LATE + 400);