Building a Transliteration File

Last modified: October 3, 2008 - 13:45

In Pathauto 4.7 a transliteration system converts non ASCII128 characters into ASCII128. This system was required and could only be updated with changes to the code.

Pathauto 5.x and 6.x-1.x transliteration file

In Pathauto 5.x and 6.x-1.x users have control over the exact functioning of the transliteration by means of an external file.

The module itself is shipped with small file called i18n-ascii.example.txt. This file contains example transliterations for common languages. To enable transliteration on your site, rename this file to i18n-ascii.txt and then check the "Enable Transliteration" setting on the Administer > Site Configuration > Pathauto page.

You can expand on the example file or remove some of the characters to get a set of characters that are suited to your site.

Expanded Transliteration File

You can also use this full transliteration file for every UTF-8 character. This file provides a basis which should be edited and reduced to your site specific needs, but it can be helpful when building your file. Be sure to edit it and transfer it with tools that support UTF-8.

Transliteration in 6.x-2.x onwards

From Pathauto 6.x-2.x and onwards, the path transliteration is handled by the Transliteration module, and the i18n-ascii.txt file will thus no longer be used.

UTF-8 Full transliteration file served in ISO-8859-1

open-keywords - April 9, 2008 - 22:10

Since drupal.org serves its content in ISO-8859-1, the file at http://drupal.org/files/issues/i18n-ascii-full.txt may also be transfered as ISO Latin 1 instead of UTF-8.

Be sure to switch your web browser encoding to UTF-8 when viewing this file (View / Character Encoding in Mozilla SeaMonkey for example) to get it right.
It would be safer to have a ziped version of this file for instance on drupal.org

Transliteration module

Frank Ralf - April 29, 2009 - 12:03

As of now, the Transliteration module only automatically transliterates names of uploaded files:

This module provides a central transliteration service for other Drupal modules, as well as sanitizing of file names when uploading new files.

But other modules could hook into this feature as stated in the documentation:

Module developers who want to make use of transliteration to clean input
strings may use code similar to this:

if (module_exists('transliteration')) {
$transliterated = transliteration_get($string);
}

Take a look at transliteration.module for an explanation of additional function
parameters.

So using a transliteration file might still be a viable option as Pathauto 6.x-2.x (http://drupal.org/node/273527) is still in unstable development state.

Frank

Umlaut sz ß and stuff

Drupal Berlin - August 23, 2009 - 21:42

Had the this problem and did't understand most of what I read about it, so here goes:

'i18n-ascii.txt' is the OLD answer, now it's:

- Install http://drupal.org/project/transliteration
- check the box at admin/build/path/pathauto ('Transliterate prior to creating alias')

That's all Folks!

________________
http://www.drupalberlin.com

 
 

Drupal is a registered trademark of Dries Buytaert.