You are here

function install_config_download_translations in Drupal 9

Same name and namespace in other branches
  1. 8 core/includes/install.core.inc \install_config_download_translations()

Replaces install_download_translation() during configuration installs.

Parameters

array $install_state: An array of information about the current installation state.

Return value

string A themed status report, or an exception if there are requirement errors. Upon successful download the page is reloaded and no output is returned.

See also

install_download_translation()

File

core/includes/install.core.inc, line 2383
API functions for installing Drupal.

Code

function install_config_download_translations(&$install_state) {
  $needs_download = isset($install_state['parameters']['langcode']) && !isset($install_state['translations'][$install_state['parameters']['langcode']]) && $install_state['parameters']['langcode'] !== 'en';
  if ($needs_download) {
    return install_download_translation($install_state);
  }
}