How to transliterate cyrillic characters into latin letters?
E.g. Главная страница -> Glavnaja stranica
This Transliteration PHP Extension would do this very well, but I can't install it on my server.
It would be best to have the same implementation but in PHP.
@Tural Teyyuboglu
Your code has a problem: if you try to transliterate for example "щеки" to latin and then back to cyrillic it will produce something like "схтеки". The multi-byte characters must appear first in the array like this:
echo transliterate(null, transliterate("щеки")) == "щеки";
for me the best solution was to use
missing ё, э, ы (Э, Ы, Ё) letters
This is my version of transliteration table for russian alphabet. It's unofficial but based on technical standards GOST 7.79-2000 and GOST 16876-71. Multi-characters go first.
The best option is using PHP Intl Extension. You might want install it first.
This will do the trick:
I applied 'Russian-Latin/BGN' because the asker used Russian language in his question. However, there are options for other languages written in the Cyrillic script. To view all of them do this: