You are here

function transliteration_get in Transliteration 5.2

Same name and namespace in other branches
  1. 5 transliteration.module \transliteration_get()
  2. 6.3 transliteration.module \transliteration_get()
  3. 6 transliteration.module \transliteration_get()
  4. 6.2 transliteration.module \transliteration_get()
  5. 7.3 transliteration.module \transliteration_get()

Transliterate UTF-8 text to ASCII.

Takes an input string in any language and character set, and tries to represent it in ASCII characters by conveying, in Roman letters, the pronunciation expressed by the text in some other writing system.

Parameters

$input: UTF-8 text input.

$unknown: Replacement string for characters that do not have a suitable ASCII equivalent.

$locale: Optional ISO 639 language code that denotes the language of the input. Used to apply language-specific variations and defaults to the current display language. If transliteration takes place during output (instead of creation) and the source language is not known at that time, it is recommended to set this argument to 'en' to produce consistent results for all enabled languages.

Return value

Transliterated text.

File

./transliteration.module, line 33
Provides transliteration for UTF-8 text input and sanitzes file names.

Code

function transliteration_get($input, $unknown = '?', $locale = NULL) {
  require_once drupal_get_path('module', 'transliteration') . '/transliteration.inc';
  return transliteration_process($input, $unknown, $locale);
}