Skip to content

Instantly share code, notes, and snippets.

@SergeR
Last active December 20, 2015 00:48
Embed
What would you like to do?
Russian transliteration rules for CakePHP Inflector
Inflector::rules('transliteration', array(
'/а/' => 'a',
'/б/' => 'b',
'/в/' => 'v',
'/г/' => 'g',
'/д/' => 'd',
'/е/' => 'e',
'/ё/' => 'yo',
'/ж/' => 'zh',
'/з/' => 'z',
'/и/' => 'i',
'/й/' => 'yi',
'/к/' => 'k',
'/л/' => 'l',
'/м/' => 'm',
'/н/' => 'n',
'/о/' => 'o',
'/п/' => 'p',
'/р/' => 'r',
'/с/' => 's',
'/т/' => 't',
'/у/' => 'u',
'/ф/' => 'f',
'/х/' => 'kh',
'/ц/' => 'ts',
'/ч/' => 'ch',
'/ш/' => 'sh',
'/щ/' => 'sch',
'/ь/' => '',
'/ы/' => 'y',
'/ъ/' => '',
'/э/' => 'e',
'/ю/' => 'yu',
'/я/' => 'ya',
'/А/' => 'A',
'/Б/' => 'B',
'/В/' => 'V',
'/Г/' => 'G',
'/Д/' => 'D',
'/Е/' => 'E',
'/Ё/' => 'Yo',
'/Ж/' => 'Zh',
'/З/' => 'Z',
'/И/' => 'I',
'/Й/' => 'Yi',
'/К/' => 'K',
'/Л/' => 'L',
'/М/' => 'M',
'/Н/' => 'N',
'/О/' => 'O',
'/П/' => 'P',
'/Р/' => 'R',
'/С/' => 'S',
'/Т/' => 'T',
'/У/' => 'U',
'/Ф/' => 'F',
'/Х/' => 'Kh',
'/Ц/' => 'Ts',
'/Ч/' => 'Ch',
'/Ш/' => 'Sh',
'/Щ/' => 'Sch',
'/Ь/' => '',
'/Ы/' => 'Y',
'/Ъ/' => '',
'/Э/' => 'E',
'/Ю/' => 'Yu',
'/Я/' => 'Ya'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment