You are here

function i18n_node_get_lang in Internationalization 5.2

Same name and namespace in other branches
  1. 5.3 i18n.module \i18n_node_get_lang()
  2. 5 i18n.module \i18n_node_get_lang()
  3. 6 i18n.module \i18n_node_get_lang()
  4. 7 i18n_node/i18n_node.module \i18n_node_get_lang()

Get node language

1 call to i18n_node_get_lang()
i18n_token_values in ./i18n.module
Implementation of hook_token_values().

File

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

Code

function i18n_node_get_lang($nid, $default = '') {
  $lang = db_result(db_query('SELECT language FROM {i18n_node} WHERE nid=%d', $nid));
  return $lang ? $lang : $default;
}