You are here

function tmgmt_i18n_string_translate_form_validate in Translation Management Tool 7

Validation callback for the entity translation overview form.

1 string reference to 'tmgmt_i18n_string_translate_form_validate'
tmgmt_i18n_string_form_i18n_string_translate_page_overview_form_alter in sources/i18n_string/tmgmt_i18n_string.module
Implements hook_form_ID_alter().

File

sources/i18n_string/tmgmt_i18n_string.module, line 166
Source plugin for the Translation Management system that handles i18n strings.

Code

function tmgmt_i18n_string_translate_form_validate($form, &$form_state) {
  $selected = array_filter($form_state['values']['languages']);
  if (empty($selected)) {
    form_set_error('languages', t('You have to select at least one language for requesting a translation.'));
  }
}