You are here

function name_translite_letters in Name Field 7

Helper function to get all of the allowed letters in a name.

File

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

Code

function name_translite_letters($base = 'a-zA-Z') {
  static $letters;
  if (!isset($letters)) {
    $file = drupal_get_path('module', 'name') . '/' . 'i18n-ascii.txt';
    $letters = '';
    $translations = parse_ini_file($file);
    foreach ($translations as $l => $t) {
      $letters .= $l;
    }
  }
  return $base . $letters;
}