You are here

function geoip_language_settings_form_submit in GeoIP API 6

Same name and namespace in other branches
  1. 7 geoip_language/geoip_language.admin.inc \geoip_language_settings_form_submit()

FAPI submit handler.

File

geoip_language/geoip_language.admin.inc, line 87
Admin page callbacks for the GeoIP Language module.

Code

function geoip_language_settings_form_submit($form, &$form_state) {
  geoip_language_mapping_create($form_state['values']['country'], $form_state['values']['language']);
  $countries = geoip_country_values();
  drupal_set_message(t('GeoIP mapping created for %country.', array(
    '%country' => $countries[$form_state['values']['country']],
  )));
  $form_state['redirect'] = 'admin/settings/language/geoip';
}