You are here

function lingotek_language_native in Lingotek Translation 6

Same name and namespace in other branches
  1. 7.7 lingotek.reference.inc \lingotek_language_native()
  2. 7.2 lingotek.reference.inc \lingotek_language_native()
  3. 7.3 lingotek.reference.inc \lingotek_language_native()
  4. 7.4 lingotek.reference.inc \lingotek_language_native()
  5. 7.5 lingotek.reference.inc \lingotek_language_native()
  6. 7.6 lingotek.reference.inc \lingotek_language_native()

File

./lingotek.reference.inc, line 251

Code

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