You are here

function lingotek_language_name in Lingotek Translation 6

Same name and namespace in other branches
  1. 7.7 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()
1 call to lingotek_language_name()
lingotek_language_native in ./lingotek.reference.inc

File

./lingotek.reference.inc, line 232

Code

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