function i18n_node_translate_type in Internationalization 7
Shorthand for translating node type strings
Parameters
$type: Node type name or full object
4 calls to i18n_node_translate_type()
- i18n_node_add_page in i18n_node/
i18n_node.pages.inc - Replacement for node_add_page.
- i18n_node_block_view_system_help_alter in i18n_node/
i18n_node.module - Implements hook_block_view_MODULE_DELTA_alter().
- i18n_node_form_search_form_alter in i18n_node/
i18n_node.module - Implements hook_form_FORM_ID_alter().
- _i18n_node_form_node_form_alter in i18n_node/
i18n_node.module - Implements hook_form_BASE_FORM_ID_alter(). Called by i18n_node_form_node_form_alter
File
- i18n_node/
i18n_node.module, line 572 - Internationalization (i18n) module - Node type handling
Code
function i18n_node_translate_type($type, $property = 'name', $source = NULL, $options = array()) {
if (is_object($type)) {
$source = $type->{$property};
$type = $type->type;
}
return i18n_string_translate(array(
'node',
'type',
$type,
$property,
), $source, $options);
}