You are here

function l10n_update_stream_wrappers in Localization update 7.2

Implements hook_stream_wrappers().

File

./l10n_update.module, line 272
Download translations from remote localization server.

Code

function l10n_update_stream_wrappers() {

  // Load the stream wrapper class if not automatically loaded. This happens
  // before update.php is executed.
  if (!class_exists('TranslationsStreamWrapper')) {
    require_once 'includes/locale/TranslationsStreamWrapper.php';
  }
  $wrappers['translations'] = array(
    'name' => t('Translation files'),
    'class' => 'TranslationsStreamWrapper',
    'description' => t('Translation files.'),
    'type' => STREAM_WRAPPERS_LOCAL_HIDDEN,
  );
  return $wrappers;
}