locale_translation_filters

7 locale.admin.inc locale_translation_filters()
8 locale.pages.inc locale_translation_filters()

List locale translation filters that can be applied.

Related topics

2 calls to locale_translation_filters()

File

modules/locale/locale.admin.inc, line 806
Administration functions for locale.module.

Code

function locale_translation_filters() {
  $filters = array();

  // Get all languages, except English
  drupal_static_reset('language_list');
  $languages = locale_language_list('name');
  unset($languages['en']);

  $filters['string'] = array(
    'title' => t('String contains'), 
    'description' => t('Leave blank to show all strings. The search is case sensitive.'),
  );

  $filters['language'] = array(
    'title' => t('Language'), 
    'options' => array_merge(array('all' => t('All languages'), 'en' => t('English (provided by Drupal)')), $languages),
  );

  $filters['translation'] = array(
    'title' => t('Search in'), 
    'options' => array(
      'all' => t('Both translated and untranslated strings'),
      'translated' => t('Only translated strings'),
      'untranslated' => t('Only untranslated strings'),
    ),
  );

  $groups = module_invoke_all('locale', 'groups');
  $filters['group'] = array(
    'title' => t('Limit search to'), 
    'options' => array_merge(array('all' => t('All text groups')), $groups),
  );

  return $filters;
}
Login or register to post comments