Sign in Registration
ruen

Transliteration rules from Russian to English - complete alphabet and ready-made PHP function

Transliteration or transliteration can be needed anywhere, for example, to compose URLs. Transliteration is often used in various official documents and media - in ordinary passports, in foreign passports, in international certificates, in bank cards, etc. Sometimes there is a need to indicate your own data in transliteration - for this you need a table with the rules for translating each character into a character in another language.

rules-transliteration-russian-english-complete-alphabet-php-function

Even such large organizations as banks, correct transliteration is not always done, for example, on one bank card the name and surname can be written in one way, but on another card according to different rules. Also on the net, you can find many tables with transliteration rules , but as it turned out, different characters are encoded differently in them - there is no unity of transliteration.

Therefore, it was required to create a table based on the transliteration rules in popular services. As a result of the analysis, a complete alphabet was prepared with the rules for transliteration from Russian into English.

Complete transliteration alphabet

Uppercase
A => A K => K X => H
B => B L => L C => C
B => V M => M H => CH
G => G N => N W => SH
D => D O => O Щ => SHCH
E => E P => P b =>
Ё => YO R => R S => Y
F => ZH C => S b =>
Z => Z T => T E => E
AND => I U => U YU => YU
Y => Y Ф => F I => YA
Lowercase
a => a k => k x => h
b => b l => l c => c
in => v m => m h => ch
r => g n => n w => sh
d => d o => o u => shch
e => e n => p ъ =>
ё => yo p => r s => y
f => zh c => s ь =>
s => z t => t e => e
and => i y => u yu => yu
th => y f => f i => ya

PHP function for transliteration

Below is a ready-made PHP function for translating from Russian to English . It can be useful for URL transliterations and more, it can be easily modified to suit your needs.

  function get_translit ($ string) {
$ converter = array (
'A' => 'A', 'B' => 'B', 'C' => 'V', 'D' => 'G', 'D' => 'D', 'E' => 'E', 'E' => 'YO', 'F' => 'ZH', 'Z' => 'Z', 'I' => 'I', 'Y' => 'Y',
'K' => 'K', 'L' => 'L', 'M' => 'M', 'N' => 'N', 'O' => 'O', 'P' => 'P', 'P' => 'R', 'C' => 'S', 'T' => 'T', 'Y' => 'U', 'F' => 'F',
'X' => 'H', 'Ts' => 'C', 'H' => 'CH', 'W' => 'SH', 'Щ' => 'SHCH', 'b' => '', 'Y' => 'Y', 'b' => '', 'E' => 'E', 'Y' => 'YU', 'I' => 'YA',

'a' => 'a', 'b' => 'b', 'c' => 'v', 'd' => 'g', 'd' => 'd', 'e' => 'e', 'e' => 'yo', 'f' => 'zh', 'z' => 'z', 'and' => 'i', 'd' => 'y',
'k' => 'k', 'l' => 'l', 'm' => 'm', 'n' => 'n', 'o' => 'o', 'n' => 'p', 'p' => 'r', 'c' => 's', 't' => 't', 'y' => 'u', 'f' => 'f',
'x' => 'h', 'q' => 'c', 'h' => 'ch', 'w' => 'sh', 'u' => 'shch', 'ъ' => '', 's' => 'y', 'b' => '', 'e' => 'e', ​​'y' => 'yu', 'i' => 'ya',
);

$ string = strtr ($ string, $ converter);

return $ string;
}  

Thus, using the above transliteration rules or a ready-made PHP function from this article, you can get correctly transliterated text that will match the transliteration in popular services and systems.

Comments (0)
For commenting sign in or register.
Оставить заявку

Latest articles

Popular sections

Eqsash (Tools)

Android app - VK LAST USER ID, отучитель от зависимости и т.д.:
Available on Google Play

Amessage (Communication)

Login to the web version
Android app:
Available on Google Play

Share this

Subscribe to

YouTube

Books

IT notes - In simple language about the most necessary things (HTML, CSS, JavaScript, PHP, databases, Drupal, Bitrix, SEO, domains, security and more), PDF, 500 p.