Hi there.

In my Drupal 7, I installed pathauto module but in its configuration options I don't see the "transliteration" option (as in Drupal 6).

Anyway, for the sake of a test, I added some content whose titles contain special characters (á,ñ...) and they get "removed" instead of "transliterated".

What can I do to get the same pathauto transliteration functionality as I used to in Drupal 6?

Thanks in advance

Comments

rolandpish’s picture

Solved.
I didn't know that now pathauto for Drupal 7 requires a separate module called "Transliteration". After installing that, the corresponding option is now available on pathauto options.
Sorry for the noise.

aldim’s picture

Your answer was very helpful for me, because I couldn't find transliteration in pathauto settings too. Thanks.

sokrplare’s picture

yves_s’s picture

Here the same.

freelancer.rs’s picture

Open the file site/modules/all/pathauto/pathauto.inc

Find the function

if ($cache['lowercase']) {
$output = drupal_strtolower($output);

}

and add some lines before the last line:

if ($cache['lowercase']) {
$output = str_replace("š", "s", $output); // this will replace "š" to "s"
$output = str_replace("Š", "s", $output);
$output = str_replace("ž", "z", $output);
$output = str_replace("Ž", "z", $output);
$output = drupal_strtolower($output);

}

Save this file in UTF-8, and upload the file.

tobias-’s picture

This solution is not recommended. It will break the upgrade flow for your modules.

As stated in earlier comment:

* install module "transliterate"
* go to setting page for pathauto and check "Transliterate prior to creating alias"

However, this does not "fix" already created aliases. These needs to be deleted and recreated.