1 install.core.inc install_download_translation(array &$install_state)

Download a translation file for the selected language.

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.

File

core/includes/install.core.inc, line 1497
API functions for installing Backdrop.

Code

function install_download_translation(array &$install_state) {
  // Check whether all conditions are met to download. Download the translation
  // if possible.
  $requirements = install_check_translation_download($install_state['parameters']['langcode']);
  // Render requirements if any warnings or errors returned.
  if ($output = install_display_requirements($install_state, $requirements)) {
    return $output;
  }

  // The download was successful, reload the page in the new language.
  $install_state['translations'][$install_state['parameters']['langcode']] = TRUE;
}