You are here

function lingotek_admin_additional_translation_settings_form_validate in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lingotek.admin.inc \lingotek_admin_additional_translation_settings_form_validate()
  2. 7.5 lingotek.admin.inc \lingotek_admin_additional_translation_settings_form_validate()
  3. 7.6 lingotek.admin.inc \lingotek_admin_additional_translation_settings_form_validate()
1 call to lingotek_admin_additional_translation_settings_form_validate()
lingotek_setup_additional_translation_settings_form_validate in ./lingotek.setup.inc
1 string reference to 'lingotek_admin_additional_translation_settings_form_validate'
lingotek_admin_additional_translation_settings_form in ./lingotek.admin.inc
Additional translation form

File

./lingotek.admin.inc, line 422

Code

function lingotek_admin_additional_translation_settings_form_validate($form, &$form_state) {

  // check for required modules if config translation is enabled
  $conf_part = $form['additional_translation']['lingotek_translate_config'];
  $conf_opt_part = $form['additional_translation']['lingotek_translate_config_options'];
  if ($conf_part && $conf_part['#value'] != 0) {
    lingotek_verify_modules_enabled(array(
      'variable',
      'i18n',
      'i18n_translation',
      'i18n_string',
    ));
    if ($conf_opt_part['lingotek_translate_config_blocks'] && $conf_opt_part['lingotek_translate_config_blocks']['#value'] != 0) {
      lingotek_verify_modules_enabled(array(
        'i18n_block',
      ));
    }
    if ($conf_opt_part['lingotek_translate_config_taxonomies'] && $conf_opt_part['lingotek_translate_config_taxonomies']['#value'] != 0) {
      lingotek_verify_modules_enabled(array(
        'i18n_taxonomy',
      ));
    }
    if ($conf_opt_part['lingotek_translate_config_menus'] && $conf_opt_part['lingotek_translate_config_menus']['#value'] != 0) {
      lingotek_verify_modules_enabled(array(
        'i18n_menu',
      ));
    }
    if ($conf_opt_part['lingotek_translate_config_views'] && $conf_opt_part['lingotek_translate_config_views']['#value'] != 0) {
      lingotek_verify_modules_enabled(array(
        'i18nviews',
      ));
    }
  }
}