function i18nprofile_field_form_submit in Internationalization 6
Process profile_field_form submissions.
1 string reference to 'i18nprofile_field_form_submit'
- i18nprofile_form_alter in i18nprofile/
i18nprofile.module  - Implementation of hook_form_alter().
 
File
- i18nprofile/
i18nprofile.module, line 161  - Internationalization (i18n) submodule: Profile translation.
 
Code
function i18nprofile_field_form_submit($form, &$form_state) {
  $values = (object) $form_state['values'];
  // Check old field name in case it has changed.
  $oldname = $form['fields']['name']['#default_value'];
  if ($oldname != 'profile_' && $oldname != $values->name) {
    i18nstrings_update_context("profile:field:{$oldname}:*", "profile:field:{$values->name}:*");
  }
  // Store category.
  i18nstrings_update("profile:category", $values->category);
  // Store strings to translate: title, explanation, options.
  i18nstrings_update_object("profile:field:{$values->name}", $values, array(
    'title',
    'explanation',
    'options',
  ));
}