Merge pull request #17388 from seamuslee001/domain_tokens_message_template_admin_inte...
[civicrm-core.git] / setup / plugins / installDatabase / SetLanguage.civi-setup.php
CommitLineData
4bcd4c62
TO
1<?php
2/**
3 * @file
4 *
5 * Configure settings on the newly populated database.
6 */
7
8if (!defined('CIVI_SETUP')) {
9 exit("Installation plugins must only be loaded by the installer.\n");
10}
11
12\Civi\Setup::dispatcher()
13 ->addListener('civi.setup.installDatabase', function (\Civi\Setup\Event\InstallDatabaseEvent $e) {
14 if ($e->getModel()->lang) {
15 \Civi\Setup::log()->info('[SetLanguage.civi-setup.php] Set default language to ' . $e->getModel()->lang);
16 \Civi::settings()->set('lcMessages', $e->getModel()->lang);
17 }
18 }, \Civi\Setup::PRIORITY_LATE + 400);