function i18n_node_get_lang in Internationalization 7
Same name and namespace in other branches
- 5.3 i18n.module \i18n_node_get_lang()
- 5 i18n.module \i18n_node_get_lang()
- 5.2 i18n.module \i18n_node_get_lang()
- 6 i18n.module \i18n_node_get_lang()
Get node language.
File
- i18n_node/
i18n_node.module, line 161 - Internationalization (i18n) module - Node type handling
Code
function i18n_node_get_lang($nid, $default = '') {
$lang = db_query('SELECT language FROM {node} WHERE nid = :nid', array(
':nid' => $nid,
))
->fetchField();
return $lang ? $lang : $default;
}