W3cubDocs

/Drupal 8

function locale_translation_get_file_history

locale_translation_get_file_history()

Gets current translation status from the {locale_file} table.

Return value

array Array of translation file objects.

File

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

Code

function locale_translation_get_file_history() {
  $history = &drupal_static(__FUNCTION__, array());

  if (empty($history)) {
    // Get file history from the database.
    $result = db_query('SELECT project, langcode, filename, version, uri, timestamp, last_checked FROM {locale_file}');
    foreach ($result as $file) {
      $file->type = $file->timestamp ? LOCALE_TRANSLATION_CURRENT : '';
      $history[$file->project][$file->langcode] = $file;
    }
  }
  return $history;
}

© 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_get_file_history/8.1.x