You are here

function lingotek_language_name in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 6 lingotek.reference.inc \lingotek_language_name()
  2. 7.2 lingotek.reference.inc \lingotek_language_name()
  3. 7.3 lingotek.reference.inc \lingotek_language_name()
  4. 7.4 lingotek.reference.inc \lingotek_language_name()
  5. 7.5 lingotek.reference.inc \lingotek_language_name()
  6. 7.6 lingotek.reference.inc \lingotek_language_name()
4 calls to lingotek_language_name()
lingotek_entity_translation_save_status in ./lingotek.util.inc
Save a translation to the Entity Translation table with status and additional parameters
lingotek_language_native in ./lingotek.reference.inc
lingotek_mark_phases_complete in ./lingotek.page.inc
Form constructor for the lingotek_mark_phases_complete form.
lingotek_publish_form in ./lingotek.page.inc
Form constructor for the Lingotek Publish form (functionality dependent on entity_translation module installed and enabled).

File

./lingotek.reference.inc, line 228

Code

function lingotek_language_name($drupal_language_code) {
  $languages = language_list();
  if (array_key_exists($drupal_language_code, $languages)) {
    return $languages[$drupal_language_code]->name;
  }
  else {
    $languages = _locale_get_predefined_list();
    if (array_key_exists($drupal_language_code, $languages) && array_key_exists(0, $languages[$drupal_language_code])) {
      return $languages[$drupal_language_code][0];
    }
    else {
      return $drupal_language_code;
    }
  }
}