Set the default language detection rules in hook_install().

This commit is contained in:
Michael Stenta 2022-01-06 13:14:35 -05:00
parent 28f23fd86b
commit ddf46fd26f
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?php
/**
* @file
* Install, update and uninstall functions for the farm_l10n module.
*/
/**
* Implements hook_install().
*/
function farm_l10n_install() {
// Configure the enabled language detection methods.
\Drupal::configFactory()->getEditable('language.types')->set('negotiation.language_interface.enabled', [
'language-session' => -50,
'language-user' => -0,
'language-selected' => 50,
])->save();
}