You are here

function i18n_object_langcode in Internationalization 7

Get object language code

Parameters

$object: Object or array having language field or plain language field

$default: What value to return if the object doesn't have a valid language

26 calls to i18n_object_langcode()
i18n_element_language_select in ./i18n.module
Get language selector form element
i18n_menu_menu_link_alter in i18n_menu/i18n_menu.module
Implements hook_menu_link_alter().
i18n_menu_menu_link_update in i18n_menu/i18n_menu.module
Implements hook_menu_link_update().
i18n_menu_menu_update in i18n_menu/i18n_menu.module
Implements hook_menu_update()
i18n_menu_node_presave in i18n_menu/i18n_menu.module
Implements hook_node_presave()

... See full list

File

./i18n.module, line 428
Internationalization (i18n) module.

Code

function i18n_object_langcode($object, $default = FALSE, $field = 'language') {
  $value = i18n_object_field($object, $field, $default);
  return $value && $value != LANGUAGE_NONE ? $value : $default;
}