You are here

function locale_custom_language_form in Drupal 5

1 string reference to 'locale_custom_language_form'
_locale_admin_manage_add_screen in includes/locale.inc
User interface for the language addition screen.

File

includes/locale.inc, line 155
Admin-related functions for locale.module.

Code

function locale_custom_language_form() {
  $form = array();
  $form['custom language'] = array(
    '#type' => 'fieldset',
    '#title' => t('Custom language'),
    '#collapsible' => TRUE,
  );
  $form['custom language']['langcode'] = array(
    '#type' => 'textfield',
    '#title' => t('Language code'),
    '#size' => 12,
    '#maxlength' => 60,
    '#required' => TRUE,
    '#description' => t('Commonly this is an <a href="@iso-codes">ISO 639 language code</a> with an optional country code for regional variants. Examples include "en", "en-US" and "zh-cn".', array(
      '@iso-codes' => 'http://www.w3.org/WAI/ER/IG/ert/iso639.htm',
    )),
  );
  $form['custom language']['langname'] = array(
    '#type' => 'textfield',
    '#title' => t('Language name in English'),
    '#maxlength' => 64,
    '#required' => TRUE,
    '#description' => t('Name of the language. Will be available for translation in all languages.'),
  );
  $form['custom language']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add custom language'),
  );

  // Use the validation and submit functions of the add language form.
  $form['#base'] = 'locale_add_language_form';
  return $form;
}