Implements transliteration without using the PECL extensions.
Transliterations are done character-by-character, by looking up non-US-ASCII characters in a transliteration database.
The database comes from two types of files, both of which are searched for in the PHPTransliteration::$dataDirectory directory. First, language-specific overrides are searched (see PHPTransliteration::readLanguageOverrides()). If there is no language-specific override for a character, the generic transliteration character tables are searched (see PHPTransliteration::readGenericData()). If looking up the character in the generic table results in a NULL value, or an illegal character is encountered, then a substitute character is returned.
Expanded class hierarchy of PHPTransliteration
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PHPTransliteration:: |
protected | property | Directory where data for transliteration resides. | |
PHPTransliteration:: |
protected | property | Non-language-specific transliteration tables. | |
PHPTransliteration:: |
protected | property | Associative array of language-specific character transliteration tables. | |
PHPTransliteration:: |
protected static | function | Finds the character code for a UTF-8 character: like ord() but for UTF-8. | |
PHPTransliteration:: |
protected | function | Reads in generic transliteration data for a bank of characters. | |
PHPTransliteration:: |
protected | function | Reads in language overrides for a language code. | 1 |
PHPTransliteration:: |
protected | function | Replaces a single Unicode character using the transliteration database. | |
PHPTransliteration:: |
public | function |
Implements TransliterationInterface::transliterate(). Overrides TransliterationInterface:: |
|
PHPTransliteration:: |
public | function | Constructs a transliteration object. |