You are here

function lingotek_language_native in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 6 lingotek.reference.inc \lingotek_language_native()
  2. 7.7 lingotek.reference.inc \lingotek_language_native()
  3. 7.2 lingotek.reference.inc \lingotek_language_native()
  4. 7.3 lingotek.reference.inc \lingotek_language_native()
  5. 7.4 lingotek.reference.inc \lingotek_language_native()
  6. 7.5 lingotek.reference.inc \lingotek_language_native()
2 calls to lingotek_language_native()
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 248

Code

function lingotek_language_native($langcode) {
  $languages = language_list();
  if (array_key_exists($langcode, $languages)) {
    return $languages[$langcode]->native;
  }
  else {
    $languages = _locale_get_predefined_list();
    if (array_key_exists($langcode, $languages) && array_key_exists(1, $languages[$langcode])) {
      return $languages[$langcode][1];
    }
    else {
      return lingotek_language_name($langcode);
    }
  }
}