Community Documentation

[archive] Building a Transliteration File

Last updated May 14, 2013. Created by Freso on October 22, 2007.
Edited by batigolix, Dave Reid, akahn, greggles. Log in to edit this page.

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.

Comments

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

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

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!

Page status

Archive

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here