diff --git a/taxonomy_title.module b/taxonomy_title.module index 10a5669..897d104 100644 --- a/taxonomy_title.module +++ b/taxonomy_title.module @@ -266,10 +266,20 @@ function taxonomy_title_token_values($type, $object = NULL, $options = array()) $values = array(); if ($type == 'taxonomy') { $category = $object; + // Use taxonomy title if it exists, else the category name. $title = _taxonomy_title_get($category->tid); - $values['term-title'] = ($title) ? check_plain($title) : check_plain($category->name); - $values['term-title-raw'] = ($title) ? $title : $category->name; + + // Translate the category name too. + if function_exists('i18nstrings') { + $name = i18nstrings("taxonomy:term:$category->tid:name", $category->name); + } + else { + $name = $category->name; + } + + $values['term-title'] = ($title) ? check_plain($title) : check_plain($name); + $values['term-title-raw'] = ($title) ? $title : $name; } return $values; }