function transliteration_get in Transliteration 7.3
Same name and namespace in other branches
- 5.2 transliteration.module \transliteration_get()
- 5 transliteration.module \transliteration_get()
- 6.3 transliteration.module \transliteration_get()
- 6 transliteration.module \transliteration_get()
- 6.2 transliteration.module \transliteration_get()
Transliterates text.
Takes an input string in any language and character set, and tries to represent it in US-ASCII characters by conveying, in Roman letters, the pronunciation expressed by the text in some other writing system.
Parameters
string $text: UTF-8 encoded text input.
string $unknown: Replacement string for characters that do not have a suitable ASCII equivalent.
string $source_langcode: Optional ISO 639 language code that denotes the language of the input and is used to apply language-specific variations. If the source language is not known at the time of transliteration, it is recommended to set this argument to the site default language to produce consistent results. Otherwise the current display language will be used.
Return value
string Transliterated text.
See also
3 calls to transliteration_get()
- transliteration_clean_filename in ./
transliteration.module - Transliterates and sanitizes a file name.
- transliteration_search_preprocess in ./
transliteration.module - Implements hook_search_preprocess().
- _transliteration_filter_process in ./
transliteration.module - Process callback for the transliteration filter.
File
- ./
transliteration.module, line 194 - Converts non-latin text to US-ASCII and sanitizes file names.
Code
function transliteration_get($text, $unknown = '?', $source_langcode = NULL) {
if (!function_exists('_transliteration_process')) {
module_load_include('inc', 'transliteration');
}
return _transliteration_process($text, $unknown, $source_langcode);
}