function i18ncontent_node_info in Internationalization 5.3
Same name and namespace in other branches
- 5 experimental/i18ncontent.module \i18ncontent_node_info()
- 5.2 experimental/i18ncontent.module \i18ncontent_node_info()
Implementation of hook_node_info()
Returns node types with translated info
File
- experimental/
i18ncontent.module, line 16 - Internationalization (i18n) package - translatable content type parameters
Code
function i18ncontent_node_info() {
// No db rewrite sql here, so we don't need to worry about our own rewriting
$type_result = db_query('SELECT nt.type, nt.* FROM {node_type} nt ORDER BY nt.type ASC', 'nt', 'type');
while ($type = db_fetch_object($type_result)) {
$type->name = tt("nodetype:{$type->type}:name", $type->name);
$type->description = tt("nodetype:{$type->type}:description", $type->description);
$info[$type->type] = (array) $type;
}
return $info;
}