My base language is German and I'm using Pathauto with Transliteration to get proper URLs without diacritics.

When I create or update an English translation to my German nodes the source node path will be altered and changed to a slightly different notation than specified in the Pathauto patterns.

In specific all umlauts in the paths are changed from transliterated versions to single letters:
produkte/buerste (Bürste)
will be changed to
produkte/burste

I've investigated the code and I see that transliteration_get() is called without the language code, so if I edit an english translation also english is used to updated the german path.

We need a fix where Pathauto calls transliteration_get() with the node language the path belongs to.

As a dirty workaround I changed line 189 to the following until this issue gets fixed:

$output = transliteration_get($output,'?','de');

If you have Blocks and other stuff belonging to paths your could break the whole site by editing translations. It also breaks the auto alias feature for the source node.

Comments

Wolfgang Reszel’s picture

The documentation of Transliteration says:

Note that the optional $source_langcode parameter specifies the language code
of the input. If the source language is not known at the time of transliter-
ation, it is recommended to set this argument to the site default language:

$output = transliteration_get($text, '?', language_default('language'));

Otherwise the current display language will be used, which might produce
inconsistent results.

So, at least that should be used.

dave reid’s picture

Status: Active » Closed (duplicate)