dzcpy / transliteration

UTF-8 to ASCII transliteration / slugify module for node.js, browser, Web Worker, React Native, Electron and CLI.

Home Page:http://dzcpy.github.io/transliteration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Built-in Support for Yandex Rules for Cyrillic

ilyaigpetrov opened this issue · comments

I don't like the transliteration rules used for Cyrillic and want to use Yandex rules (for names, on the map, etc.) instead (Yandex.Money also have rules for credit cards, just in case).
One solution to my problem is to use replace config, but in #57 @andyhu states:

...using 'replace' option to do it seems not an ideal solution. Because it uses a global regex replace. If there are many replaces and the text is very long, considering it's not implement as an async function, it may freeze the node process.

So I guess better solution would be to support Yandex rules out of the box and in this issue I ask for this.
I would write a patch myself, but considering you plan some drastic changes for 2.0, I don't do this.
Let me know if I may help you implementing Yandex rules support.

Thanks.

UPD

What is the source for current transliteration rules for Cyrillic in charmap.json? Was it built with Google Transliteration API or other way?

I wasn't attentive: the Yandex rules I referenced are for names (on the map, etc.). I doubt I need transliterating names. Sorry for disturbing. I hope the rules of transliteration you use are from a good source and I may trust them.