function locale_translation_status_delete_languages

Delete language entries from the status cache.

Parameters

array $langcodes: Language code(s) to be deleted from the cache.

1 call to locale_translation_status_delete_languages()
locale_language_delete in drupal/core/modules/locale/locale.module
Implements hook_language_delete().

File

drupal/core/modules/locale/locale.module, line 909
Enables the translation of the user interface to languages other than English.

Code

function locale_translation_status_delete_languages($langcodes) {
  if ($status = Drupal::state()
    ->get('locale.translation_status')) {
    foreach ($status as $project => $languages) {
      foreach ($languages as $langcode => $source) {
        if (in_array($langcode, $langcodes)) {
          unset($status[$project][$langcode]);
        }
      }
    }
    Drupal::state()
      ->set('locale.translation_status', $status);
  }
}