sindresorhus / Transliterate
Licence: mit
Convert Unicode characters to Latin characters using transliteration
Stars: ✭ 152
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Transliterate
Figures
Unicode symbols with Windows CMD fallbacks
Stars: ✭ 438 (+188.16%)
Mutual labels: npm-package, node-module, unicode
Lexical Sort
Sort Unicode strings lexicographically
Stars: ✭ 23 (-84.87%)
Mutual labels: unicode, transliteration
Slug Generator
Slug Generator Library for PHP, based on Unicode’s CLDR data
Stars: ✭ 740 (+386.84%)
Mutual labels: unicode, transliteration
Aws Lambda Libreoffice
85 MB LibreOffice to fit inside AWS Lambda compressed with Brotli
Stars: ✭ 145 (-4.61%)
Mutual labels: npm-package, node-module
Rando.js
The world's easiest, most powerful random function.
Stars: ✭ 659 (+333.55%)
Mutual labels: npm-package, node-module
Node Module Boilerplate
Boilerplate to kickstart creating a Node.js module
Stars: ✭ 668 (+339.47%)
Mutual labels: npm-package, node-module
midtrans-node
Unoffficial Midtrans Payment API Client for Node JS | Alternative for Midtrans Official Module | https://midtrans.com
Stars: ✭ 15 (-90.13%)
Mutual labels: npm-package, node-module
Awesome Node Utils
some useful npm packages for nodejs itself
Stars: ✭ 51 (-66.45%)
Mutual labels: npm-package, node-module
Node Loadbalance
A collection of distilled load balancing engines
Stars: ✭ 79 (-48.03%)
Mutual labels: npm-package, node-module
Urlify
A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.
Stars: ✭ 633 (+316.45%)
Mutual labels: unicode, transliteration
Transliteration
UTF-8 to ASCII transliteration / slugify module for node.js, browser, Web Worker, React Native, Electron and CLI.
Stars: ✭ 444 (+192.11%)
Mutual labels: unicode, transliteration
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+365.13%)
Mutual labels: npm-package, node-module
P Queue
Promise queue with concurrency control
Stars: ✭ 1,863 (+1125.66%)
Mutual labels: npm-package, node-module
Crx Jtrans
jTransliter - the roman to unicode transliter as Google chrome extension
Stars: ✭ 13 (-91.45%)
Mutual labels: unicode, transliteration
sdbm
SDBM non-cryptographic hash function
Stars: ✭ 43 (-71.71%)
Mutual labels: npm-package, node-module
unidecode
Elixir package to transliterate Unicode to ASCII
Stars: ✭ 18 (-88.16%)
Mutual labels: unicode, transliteration
Fnv1a
FNV-1a non-cryptographic hash function
Stars: ✭ 101 (-33.55%)
Mutual labels: npm-package, node-module
transliterate
Convert Unicode characters to Latin characters using transliteration
Can be useful for slugification purposes and other times you cannot use Unicode.
Install
$ npm install @sindresorhus/transliterate
Usage
const transliterate = require('@sindresorhus/transliterate');
transliterate('Fußgängerübergänge');
//=> 'Fussgaengeruebergaenge'
transliterate('Я люблю единорогов');
//=> 'Ya lyublyu edinorogov'
transliterate('أنا أحب حيدات');
//=> 'ana ahb hydat'
transliterate('tôi yêu những chú kỳ lân');
//=> 'toi yeu nhung chu ky lan'
API
transliterate(string, options?)
string
Type: string
String to transliterate.
options
Type: object
customReplacements
Type: Array<string[]>
Default: []
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 = require('@sindresorhus/transliterate');
transliterate('Я люблю единорогов', {
customReplacements: [
['единорогов', '🦄']
]
})
//=> 'Ya lyublyu 🦄'
Supported languages
Most major languages are supported.
This includes special handling for:
- Arabic
- Armenian
- Czech
- Danish
- Dhivehi
- Georgian
- German (umlauts)
- Greek
- Hungarian
- Latin
- Latvian
- Lithuanian
- Macedonian
- Pashto
- Persian
- Polish
- Romanian
- Russian
- Serbian
- Slovak
- Swedish
- Turkish
- Ukrainian
- Urdu
- Vietnamese
However, Chinese is currently not supported.
Related
- slugify - Slugify a string
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].