1 locale.bulk.inc locale_translate_export_screen()

User interface for the translation export screen.

File

core/modules/locale/locale.bulk.inc, line 112
Mass import-export and batch import functionality for Gettext .po files.

Code

function locale_translate_export_screen() {
  // Get all enabled languages, except English, if we should not translate that.
  backdrop_static_reset('language_list');
  $languages = language_list(TRUE);
  $language_options = array();
  foreach ($languages as $langcode => $language) {
    if ($langcode != 'en' || locale_translate_english()) {
      $language_options[$langcode] = $language->name;
    }
  }

  $output = '';
  // Offer translation export if any language is set up.
  if (!empty($language_options)) {
    $elements = backdrop_get_form('locale_translate_export_po_form', $language_options);
    $output = backdrop_render($elements);
  }
  $elements = backdrop_get_form('locale_translate_export_pot_form');
  $output .= backdrop_render($elements);
  return $output;
}