_locale_admin_export_screen

Versions
4.6 – 5
_locale_admin_export_screen()

User interface for the translation export screen

Code

includes/locale.inc, line 700

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

  // Offer language specific export if any language is set up
  if (count($languages)) {
    $output .= '<h2>'. t('Export translation') .'</h2>';
    $form = form_select(t('Language name'), 'langcode', '', $languages, t('Select the language you would like to export in gettext Portable Object (.po) format.'));
    $form .= form_submit(t('Export'));
    $output .= form($form);
  }

  // Complete template export of the strings
  $output .= '<h2>'. t('Export template') .'</h2>';
  $form = t('<p>Generate a gettext Portable Object Template (.pot) file with all the interface strings from the Drupal locale database.</p>');
  $form .= form_submit(t('Export'));
  $output .= form($form);

  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.