You are here

function name_translite_word in Name Field 7

Helper function to normalise the word for sorting.

@todo Better functions in PHP?

All credit goes to the PathAuto module for this!

File

./name.module, line 1683
Defines an API for displaying and inputing names.

Code

function name_translite_word($word) {
  static $translations;
  if (!isset($translations)) {
    $file = drupal_get_path('module', 'name') . '/' . 'i18n-ascii.txt';
    $translations = parse_ini_file($file);
  }
  return strtr($word, $translations);
}