Convert Unicode characters to Latin characters using transliteration
Can be useful for slugification purposes and other times you cannot use Unicode.
$ npm install @sindresorhus/transliterate
const transliterate = ;;//=> 'Fussgaengeruebergaenge';//=> 'Ya lyublyu edinorogov';//=> 'ana ahb hydat';//=> 'toi yeu nhung chu ky lan'
String to transliterate.
Add your own custom replacements.
The replacements are run on the original string before any other transformations.
This only overrides a default replacement if you set an item with the same key.
const transliterate = ;//=> 'Ya lyublyu 🦄'
Most major languages are supported.
This includes special handling for:
- German (umlauts)
However, Chinese is currently not supported.
- slugify - Slugify a string