You are here

function _l10n_update_default_update_options in Localization update 7.2

Returns default import options for translation update.

Return value

array Array of translation import options.

6 calls to _l10n_update_default_update_options()
drush_l10n_update in ./l10n_update.drush.inc
Callback for command l10n-update.
l10n_update_batch_status_build in ./l10n_update.compare.inc
Builds a batch to get the status of remote and local translation files.
l10n_update_cron_fill_queue in ./l10n_update.translation.inc
Populate a queue with project to check for translation updates.
l10n_update_languages_changed_submit in ./l10n_update.module
Additional submit handler for language forms.
l10n_update_status_form_submit in ./l10n_update.admin.inc
Form submission handler for locale_translation_status_form().

... See full list

File

./l10n_update.translation.inc, line 426
Common API for interface translation.

Code

function _l10n_update_default_update_options() {
  $options = array(
    'customized' => L10N_UPDATE_NOT_CUSTOMIZED,
    'finish_feedback' => TRUE,
    'use_remote' => l10n_update_use_remote_source(),
  );
  switch (variable_get('l10n_update_import_mode', LOCALE_IMPORT_KEEP)) {
    case LOCALE_IMPORT_OVERWRITE:
      $options['overwrite_options'] = array(
        'customized' => TRUE,
        'not_customized' => TRUE,
      );
      break;
    case L10N_UPDATE_OVERWRITE_NON_CUSTOMIZED:
      $options['overwrite_options'] = array(
        'customized' => FALSE,
        'not_customized' => TRUE,
      );
      break;
    case LOCALE_IMPORT_KEEP:
      $options['overwrite_options'] = array(
        'customized' => FALSE,
        'not_customized' => FALSE,
      );
      break;
  }
  return $options;
}