function locale_translation_get_file_history

Gets current translation status from the {locale_file} table.

Return value

array Array of translation file objects.

6 calls to locale_translation_get_file_history()
LocaleUpdateTest::testEnableDisableModule in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests automatic translation import when a module is enabled.
LocaleUpdateTest::testUpdateImportSourceLocal in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import from local sources.
LocaleUpdateTest::testUpdateImportSourceRemote in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import from remote sources.
LocaleUpdateTest::testUpdateImportWithoutDirectory in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import without a translations directory.
locale_translation_batch_status_compare in drupal/core/modules/locale/locale.batch.inc
Batch operation callback: Compare states and store the result.

... See full list

4 string references to 'locale_translation_get_file_history'
LocaleUpdateTest::testUpdateImportSourceLocal in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import from local sources.
LocaleUpdateTest::testUpdateImportSourceRemote in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import from remote sources.
LocaleUpdateTest::testUpdateImportWithoutDirectory in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import without a translations directory.
locale_translation_batch_fetch_update_status in drupal/core/modules/locale/locale.batch.inc
Batch process: Update the download history table.

File

drupal/core/modules/locale/locale.module, line 823
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 = LOCALE_TRANSLATION_CURRENT;
      $history[$file->project][$file->langcode] = $file;
    }
  }
  return $history;
}