Same name and namespace in other branches
  1. 8.9.x core/modules/locale/locale.translation.inc \_locale_translation_default_update_options()
  2. 9 core/modules/locale/locale.translation.inc \_locale_translation_default_update_options()

Returns default import options for translation update.

Return value

array Array of translation import options.

5 calls to _locale_translation_default_update_options()
ImportForm::submitForm in core/modules/locale/src/Form/ImportForm.php
Form submission handler.
locale_cron_fill_queue in core/modules/locale/locale.translation.inc
Populate a queue with project to check for translation updates.
locale_form_language_admin_add_form_alter_submit in core/modules/locale/locale.module
Form submission handler for language_admin_add_form().
locale_system_update in core/modules/locale/locale.module
Imports translations when new modules or themes are installed.
locale_translation_batch_status_build in core/modules/locale/locale.compare.inc
Builds a batch to get the status of remote and local translation files.

File

core/modules/locale/locale.translation.inc, line 436
Common API for interface translation.

Code

function _locale_translation_default_update_options() {
  $config = \Drupal::config('locale.settings');
  return [
    'customized' => LOCALE_NOT_CUSTOMIZED,
    'overwrite_options' => [
      'not_customized' => $config
        ->get('translation.overwrite_not_customized'),
      'customized' => $config
        ->get('translation.overwrite_customized'),
    ],
    'finish_feedback' => TRUE,
    'use_remote' => locale_translation_use_remote_source(),
  ];
}