locale_form_language_admin_edit_form_alter_submit

locale_form_language_admin_edit_form_alter_submit($form, FormStateInterface $form_state) Form submission handler for language_admin_edit_form(). File core/modules/locale/locale.module, line 730 Enables the translation of the user interface to languages other than English. Code function locale_form_language_admin_edit_form_alter_submit($form, FormStateInterface $form_state) { \Drupal::configFactory()->getEditable('locale.settings')->set('translate_english', intval($form_state->getVa

locale_form_language_admin_edit_form_alter

locale_form_language_admin_edit_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter() for language_admin_edit_form(). File core/modules/locale/locale.module, line 716 Enables the translation of the user interface to languages other than English. Code function locale_form_language_admin_edit_form_alter(&$form, FormStateInterface $form_state) { if ($form['langcode']['#type'] == 'value' && $form['langcode']['#value'] == 'en') { $form['local

locale_form_language_admin_add_form_alter_submit

locale_form_language_admin_add_form_alter_submit($form, FormStateInterface $form_state) Form submission handler for language_admin_add_form(). Set a batch for a newly-added language. File core/modules/locale/locale.module, line 685 Enables the translation of the user interface to languages other than English. Code function locale_form_language_admin_add_form_alter_submit($form, FormStateInterface $form_state) { \Drupal::moduleHandler()->loadInclude('locale', 'fetch.inc'); $options = _l

locale_form_language_admin_add_form_alter

locale_form_language_admin_add_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter() for language_admin_add_form(). File core/modules/locale/locale.module, line 675 Enables the translation of the user interface to languages other than English. Code function locale_form_language_admin_add_form_alter(&$form, FormStateInterface $form_state) { $form['predefined_submit']['#submit'][] = 'locale_form_language_admin_add_form_alter_submit'; $form['custom_l

LOCALE_CUSTOMIZED

Flag for locally customized interface translation. Such translations are edited from their imported originals on the user interface or are imported as customized. File core/modules/locale/locale.module, line 77 Enables the translation of the user interface to languages other than English. Code const LOCALE_CUSTOMIZED = 1;

locale_cron_fill_queue

locale_cron_fill_queue() Populate a queue with project to check for translation updates. File core/modules/locale/locale.translation.inc, line 325 Common API for interface translation. Code function locale_cron_fill_queue() { $updates = array(); $config = \Drupal::config('locale.settings'); // Determine which project+language should be updated. $last = REQUEST_TIME - $config->get('translation.update_interval_days') * 3600 * 24; $projects = \Drupal::service('locale.project')->

locale_cron

locale_cron() Implements hook_cron(). See also \Drupal\locale\Plugin\QueueWorker\LocaleTranslation File core/modules/locale/locale.module, line 353 Enables the translation of the user interface to languages other than English. Code function locale_cron() { // Update translations only when an update frequency was set by the admin // and a translatable language was set. // Update tasks are added to the queue here but processed by Drupal's cron. if ($frequency = \Drupal::config('locale.

locale_config_batch_update_components

locale_config_batch_update_components(array $options, array $langcodes = array(), array $components = array()) Builds a locale batch to refresh configuration. Parameters array $options: An array with options that can have the following elements: 'finish_feedback': (optional) Whether or not to give feedback to the user when the batch is finished. Defaults to TRUE. array $langcodes: (optional) Array of language codes. Defaults to all translatable languages. array $components: (optional) Array

locale_config_batch_refresh_name

locale_config_batch_refresh_name(array $names, array $langcodes, &$context) Implements callback_batch_operation(). Performs configuration translation refresh. Parameters array $names: An array of names of configuration objects to update. array $langcodes: (optional) Array of language codes to update. Defaults to all languages. array|\ArrayAccess $context.: Contains a list of files imported. See also locale_config_batch_build() File core/modules/locale/locale.bulk.inc, line 605 Mass import

locale_config_batch_finished

locale_config_batch_finished($success, array $results) Implements callback_batch_finished(). Finishes callback of system page locale import batch. Parameters bool $success: Information about the success of the batch import. array $results: Information about the results of the batch import. See also locale_config_batch_build() File core/modules/locale/locale.bulk.inc, line 629 Mass import-export and batch import functionality for Gettext .po files. Code function locale_config_batch_finished(