_locale_admin_export_screen

Versions
4.6 – 5
_locale_admin_export_screen()

User interface for the translation export screen

Code

includes/locale.inc, line 272

<?php
function _locale_admin_export_screen() {
  $languages = locale_supported_languages(FALSE, TRUE);
  $languages = array_map('t', $languages['name']);
  unset($languages['en']);

  // Offer language specific export if any language is set up
  if (count($languages)) {
    $form = array();
    $form['export'] = array('#type' => 'fieldset',
      '#title' => t('Export translation'),
      '#collapsible' => TRUE,
    );
    $form['export']['langcode'] = array('#type' => 'select',
      '#title' => t('Language name'),
      '#options' => $languages,
      '#description' => t('Select the language you would like to export in gettext Portable Object (.po) format.'),
    );
    $form['export']['submit'] = array('#type' => 'submit', '#value' => t('Export'));
    $output = drupal_get_form('_locale_export_po', $form);
  }

  // Complete template export of the strings
  $form = array();
  $form['export'] = array('#type' => 'fieldset',
    '#title' => t('Export template'),
    '#collapsible' => TRUE,
    '#description' => t('Generate a gettext Portable Object Template (.pot) file with all the interface strings from the Drupal locale database.'),
  );
  $form['export']['submit'] = array('#type' => 'submit', '#value' => t('Export'));
  $output .= drupal_get_form('_locale_export_pot', $form, '_locale_export_po');

  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.