function i18n_node_language_list in Internationalization 5
Same name and namespace in other branches
- 5.3 i18n.module \i18n_node_language_list()
- 5.2 i18n.module \i18n_node_language_list()
- 6 i18n.module \i18n_node_language_list()
- 7 i18n_node/i18n_node.module \i18n_node_language_list()
Get allowed languages for node
This allows node types to define its own language list implementing hook 'language_list'
4 calls to i18n_node_language_list()
- i18n_form_alter in ./
i18n.module - Implementation of hook_form_alter
- translation_form_alter in translation/
translation.module - Implementation of hook_form_alter().
- translation_node_form in translation/
translation.module - Form builder function
- translation_node_overview in translation/
translation.module - Shows overview of current translations plus remove button
File
- ./
i18n.module, line 533 - Internationalization (i18n) module
Code
function i18n_node_language_list($node) {
if ($languages = node_invoke($node, 'language_list')) {
return $languages;
// The node module manages its own language list
}
elseif (variable_get('i18n_node_' . $node->type, 0) == LANGUAGE_SUPPORT_EXTENDED) {
return i18n_language_list(TRUE);
// All defined languages
}
else {
return i18n_language_list();
// All enabled languages
}
}