<?php

/**
 * @file
 * Install, update and uninstall functions for the farm_l10n module.
 */

declare(strict_types=1);

/**
 * Implements hook_install().
 */
function farm_l10n_install() {

  // Configure the enabled language detection methods.
  \Drupal::configFactory()->getEditable('language.types')->set('negotiation.language_interface.enabled', [
    'language-user' => 0,
    'language-selected' => 50,
  ])->save();

  // Configure automatic monthly language updates.
  \Drupal::configFactory()->getEditable('locale.settings')->set('translation.update_interval_days', 30)->save();
}
