W3cubDocs

/Drupal 8

function locale_translation_status_delete_projects

locale_translation_status_delete_projects($projects)

Delete project entries from the status cache.

Parameters

array $projects: Project name(s) to be deleted from the cache.

File

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

Code

function locale_translation_status_delete_projects($projects) {
  $status = locale_translation_get_status();

  foreach ($status as $project => $languages) {
    if (in_array($project, $projects)) {
      unset($status[$project]);
    }
  }
  \Drupal::state()->set('locale.translation_status', $status);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.module/function/locale_translation_status_delete_projects/8.1.x