Any way to get localized term names in node paths I have a node type "news" with an included term reference field named "newscategory". i18n-module incl. taxonomy-i18n is also installed, vocabulary is translatable and all terms are translated. But for pathauto patterns there is only the token "[node:field_newscategory]" available, which will not be localized depending on the node language.

Is there any trick on achieving this?
Okay, after 2 more hours of research and development I've finally managed to get the problem solved. I ended up writing a tiny custom module implementing hook_pathauto_alias_alter().

The module has several dependencies:

dependencies[] = taxonomy
dependencies[] = field_extract
dependencies[] = pathauto
dependencies[] = i18n
dependencies[] = i18n_string
dependencies[] = i18n_taxonomy


Here's how I did it (tailored to my special needs, so go on and modify my code)

&lt;?php

  /**
   * Implements hook_pathauto_alias_alter()
   */
  function mymodule_pathauto_alias_alter( &amp;$alias, array &amp;$context ) {
    if ( $context[ 'module' ] == 'node' ) {
      $node = $context[ 'data' ][ 'node' ];
      if ( $node-&gt;type == 'news' ) {
        // determine actual context variables
        $language = $context[ 'language' ];
        $pattern = $context[ 'pattern' ];
        $category = field_extract_value( 'node', $node, 'field_newscategory' );

        // translation &amp; preparation
        $category_translated = i18n_string_object_translate( 'taxonomy_term', $category, array( 'langcode' =&gt; $language ) );
        $sanitized = pathauto_cleanstring( $category_translated-&gt;name, array( 'langcode' =&gt; $language ) );

        // re-build the alias
        $alias = explode( '/', $alias );
        $pattern = explode( '/', $pattern );
        foreach ( $pattern AS $index =&gt; $part ) {
          if ( $part == '[node:field_newscategory]' ) {
            $alias[ $index ] = $sanitized;
            break;
          }
        }
        $alias = implode( '/', $alias );
      }
    }
  }

?&gt;