You are here

function lingotek_get_translation_mode in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.6 lingotek.admin.inc \lingotek_get_translation_mode()
1 call to lingotek_get_translation_mode()
lingotek_admin_entity_bundle_profiles_form in ./lingotek.admin.inc
Content translation form

File

./lingotek.admin.inc, line 468

Code

function lingotek_get_translation_mode($bundle) {
  $query = db_select('taxonomy_vocabulary', 't')
    ->fields('t', array(
    'i18n_mode',
  ))
    ->condition('machine_name', $bundle)
    ->execute();
  $result = $query
    ->fetchField();
  $modes = array(
    '0' => 'No',
    '1' => 'Localize',
    '2' => 'Fixed',
    '4' => 'Translate',
  );
  $translation_mode = array(
    '#type' => 'item',
    '#markup' => $modes[$result],
  );
  return $translation_mode;
}