You are here

function i18nviews_views_ui_edit_display_submit in Internationalization Views 6.3

Same name and namespace in other branches
  1. 6.2 i18nviews.module \i18nviews_views_ui_edit_display_submit()

Submit handler for views_ui_edit_display_form.

Creates or updates translation source records for specified Views fields.

1 string reference to 'i18nviews_views_ui_edit_display_submit'
i18nviews_form_views_ui_edit_display_form_alter in ./i18nviews.module
Implementation of hook_form_id_alter().

File

./i18nviews.module, line 116
Views support for Internationalization (i18n) package

Code

function i18nviews_views_ui_edit_display_submit($form, &$form_state) {
  $fields = _i18nviews_display_fields();
  foreach ($fields as $field) {
    if (isset($form_state['values'][$field])) {
      $name = $form_state['view']->name;
      $group = $form_state['display_id'];
      $format = isset($form_state['values'][$field . '_format']) ? $form_state['values'][$field . '_format'] : NULL;
      i18nstrings_update("views:{$name}:{$group}:{$field}", $form_state['values'][$field], $format);
    }
  }
}