You are here

function i18nstrings_translate_edit_form_submit in Internationalization 6

Process string editing form submissions.

Mark translations as current.

1 string reference to 'i18nstrings_translate_edit_form_submit'
i18nstrings_form_alter in i18nstrings/i18nstrings.module
Implementation of hook_form_alter().

File

i18nstrings/i18nstrings.module, line 210
Internationalization (i18n) package - translatable strings.

Code

function i18nstrings_translate_edit_form_submit($form, &$form_state) {
  $lid = $form_state['values']['lid'];
  foreach ($form_state['values']['translations'] as $key => $value) {
    if (!empty($value)) {

      // An update has been made, so we assume the translation is now current.
      db_query("UPDATE {locales_target} SET i18n_status = %d WHERE lid = %d AND language = '%s'", I18NSTRINGS_STATUS_CURRENT, $lid, $key);
    }
  }
}