You are here

function lingotek_language_field_lookup in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.7 lingotek.reference.inc \lingotek_language_field_lookup()
  2. 7.3 lingotek.reference.inc \lingotek_language_field_lookup()
  3. 7.4 lingotek.reference.inc \lingotek_language_field_lookup()
  4. 7.5 lingotek.reference.inc \lingotek_language_field_lookup()
  5. 7.6 lingotek.reference.inc \lingotek_language_field_lookup()
2 calls to lingotek_language_field_lookup()
lingotek_form_node_form_alter in ./lingotek.module
Implements hook_form_BASE_FORM_ID_alter().
lingotek_pm in ./lingotek.page.inc
Page callback for the Lingotek local task on node detail pages.

File

./lingotek.reference.inc, line 261

Code

function lingotek_language_field_lookup($field, $lingotek_locale) {
  $languages = language_list();
  foreach ($languages as $key => $language) {
    if (isset($language->lingotek_locale) && strcmp($language->lingotek_locale, $lingotek_locale) == 0) {
      return $language->{$field};
    }
  }
  return NULL;
}