Many web projects use friendly urls. For example, instead of the article id in the url, its text identifier (slug) is used. Usually slug is generated automatically on the server side when creating an article. But if you want to be able to set slug yourself (through the form) - you can use my syncTranslit plugin .
Publish an article from your blog . This plugin is designed for Ukrainian and Russian developers. The main task of the plugin: generation of slug from the Cyrillic text. The plugin allows you to synchronize two fields on the form, with one field being the source of the data (for example, the title of the article), and the second (slug) receiving the translated text. ')
Using
We include the plugin file, call the syncTranslit method for the source element, and pass the destination parameter — the id of the destination element:
type - url (default) or raw: defines the type of transliteration. url - for transliteration into slug (special characters are replaced). raw is used for pure conversion (preserving all special characters)
caseStyle - lower (default), normal, upper: responsible for the register of transliterated data
urlSeparator - word separator for slug (default: "-")
Example using other options: transliteration with conversion to upper case and using underscore to separate words: