Index: i18ncontent.module =================================================================== --- i18ncontent.module (revision 10237) +++ i18ncontent.module (revision 15104) @@ -204,4 +204,31 @@ } return $output; -} \ No newline at end of file +} + +/** + * Implementation of hook_token_values(). + */ +function i18ncontent_token_values($type, $object = NULL, $options = array()) { + $values = array(); + + if ($type == 'node') { + $node = $object; + $values['i18n-type-name'] = node_get_types('name', $node->type); + if (function_exists('locale') && $node->language != 'en') { + $values['i18n-type-name'] = locale($values['i18n-type-name'], $node->language); + } + } + + return $values; +} + +/** + * Implementation of hook_token_list(). + */ +function i18ncontent_token_list($type = 'all') { + if ($type == 'node' || $type == 'all') { + $tokens['node']['i18n-type-name'] = t('Node type translated in the node\'s language'); + return $tokens; + } +}