You are here

function locale_languages_edit_form in Drupal 7

Same name and namespace in other branches
  1. 6 includes/locale.inc \locale_languages_edit_form()

Editing screen for a particular language.

Parameters

$langcode: Language code of the language to edit.

Related topics

1 string reference to 'locale_languages_edit_form'
locale_menu in modules/locale/locale.module
Implements hook_menu().

File

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

Code

function locale_languages_edit_form($form, &$form_state, $langcode) {
  if ($language = db_query("SELECT * FROM {languages} WHERE language = :language", array(
    ':language' => $langcode,
  ))
    ->fetchObject()) {
    _locale_languages_common_controls($form, $language);
    $form['actions'] = array(
      '#type' => 'actions',
    );
    $form['actions']['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Save language'),
    );
    $form['#submit'][] = 'locale_languages_edit_form_submit';
    $form['#validate'][] = 'locale_languages_edit_form_validate';
    return $form;
  }
  else {
    drupal_not_found();
    drupal_exit();
  }
}