Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MarcStoecker/f181a66bb701be1bd304 to your computer and use it in GitHub Desktop.
Save MarcStoecker/f181a66bb701be1bd304 to your computer and use it in GitHub Desktop.
Umbraco: Transliterating cyrillic URLs with umbracoSettings.config
<!--
www.mindrevolution.com
ENGINEERED IN STUTTGART.
While modern systems (on server and client side) work quite well with non-latin (UTF-8) URLs,
they still present some technical risk. Transliteration of cyrillic URLs to their latin
representation can be accomplished quite easily with the standard Umbraco URL replacing
in "umbracoSettings.config" (in directory "/config/").
It is not possible to account for some of the finer details, but using a simple replacement
table will handle 95%+ of most document URLs. Here's the list to insert below the already
existing "char"-Items inside the urlReplacing-Tag:
-->
<!-- ICAO 2013 transliteration for cyrillic characters -->
<char org="А">a</char>
<char org="Б">b</char>
<char org="В">v</char>
<char org="Г">g</char>
<char org="Д">d</char>
<char org="Е">e</char>
<char org="Ё">e</char>
<char org="Ж">zh</char>
<char org="З">z</char>
<char org="И">i</char>
<char org="Й">i</char>
<char org="К">k</char>
<char org="Л">l</char>
<char org="М">m</char>
<char org="Н">n</char>
<char org="О">o</char>
<char org="П">p</char>
<char org="Р">r</char>
<char org="С">s</char>
<char org="Т">t</char>
<char org="У">u</char>
<char org="Ф">f</char>
<char org="Х">kh</char>
<char org="Ц">ts</char>
<char org="Ч">ch</char>
<char org="Ш">sh</char>
<char org="Щ">shch</char>
<char org="Ъ">ie</char>
<char org="Ы">y</char>
<char org="Ь">-</char>
<char org="Э">e</char>
<char org="Ю">iu</char>
<char org="Я">ia</char>
<char org="Ѯ">-</char>
<char org="Ѱ">-</char>
<char org="Ѡ">-</char>
<char org="Ѫ">-</char>
<char org="Ѧ">-</char>
<char org="Ѭ">-</char>
<char org="Ѩ">-</char>
<char org="Ѳ">-</char>
<char org="Ѣ">-</char>
<char org="Ѵ">-</char>
<char org="Ѵ">-</char>
<char org="а">a</char>
<char org="б">b</char>
<char org="в">v</char>
<char org="г">g</char>
<char org="д">d</char>
<char org="е">e</char>
<char org="ё">e</char>
<char org="ж">zh</char>
<char org="з">z</char>
<char org="и">i</char>
<char org="й">i</char>
<char org="к">k</char>
<char org="л">l</char>
<char org="м">m</char>
<char org="н">n</char>
<char org="о">o</char>
<char org="п">p</char>
<char org="р">r</char>
<char org="с">s</char>
<char org="т">t</char>
<char org="у">u</char>
<char org="ф">f</char>
<char org="х">kh</char>
<char org="ц">ts</char>
<char org="ч">ch</char>
<char org="ш">sh</char>
<char org="щ">shch</char>
<char org="ъ">ie</char>
<char org="ы">y</char>
<char org="ь">-</char>
<char org="э">e</char>
<char org="ю">iu</char>
<char org="я">ia</char>
<char org="і">-</char>
<char org="ѳ">-</char>
<char org="ѣ">-</char>
<char org="Ѵ">-</char>
<char org="ѯ">-</char>
<char org="ѱ">-</char>
<char org="ѡ">-</char>
<char org="ѫ">-</char>
<char org="ѧ">-</char>
<char org="ѭ">-</char>
<char org="ѩ">-</char>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment