Convert the String of number of the source language to the destination language.
npm install @alwatr/unicode-digits``bash`
yarn add @alwatr/unicode-digits
`ts
import {UnicodeDigits} from '@alwatr/unicode-digits';
const unicodeDigits = new UnicodeDigits('en');
unicodeDigits.translate('۱۲۳'); // 123
`
The following languages are supported:
- English (en)ar
- Arabic ()fa
- Persian ()nko
- N'Ko ()hi
- Hindi ()bn
- Bengali ()pa
- Punjabi ()gu
- Gujarati ()or
- Oriya ()ta
- Tamil ()te
- Telugu ()kn
- Kannada ()mal
- Malayalam ()sinhala_lith
- Sinhala Lith ()thai
- Thai ()lao
- Lao ()tibetan
- Tibetan ()myanmar
- Myanmar ()myanmar_shan
- Myanmar Shan ()khmer
- Khmer ()mongolian
- Mongolian ()limbu
- Limbu ()new_tai_lue
- New Tai Lue ()tai_tham_hora
- Tai Tham Hora ()tai_tham_tham
- Tai Tham Tham ()balinese
- Balinese ()sundanese
- Sundanese ()lepcha
- Lepcha ()ol_chiki
- Ol Chiki ()vai
- Vai ()saurashtra
- Saurashtra ()kayah_li
- Kayah Li ()javanese
- Javanese ()myanmar_tai_laing
- Myanmar Tai Laing ()cham
- Cham ()meetei_mayek
- Meetei Mayek ()fullwidth
- Fullwidth ()osmanya
- Osmanya ()brahmi
- Brahmi ()sora_sompeng
- Sora Sompeng ()chakma
- Chakma ()sharada
- Sharada ()khudawadi
- Khudawadi ()newa
- Newa ()tirhuta
- Tirhuta ()modi
- Modi ()takri
- Takri ()ahom
- Ahom ()warang_citi
- Warang Citi ()bhaiksuki
- Bhaiksuki ()mro
- Mro ()pahawh_hmong
- Pahawh Hmong ()mathematical_bold
- Mathematical Bold ()mathematical_double-struck
- Mathematical Double-struck ()mathematical_sans-serif
- Mathematical Sans-serif ()mathematical_sans-serif_bold
- Mathematical Sans-serif Bold ()mathematical_monospace
- Mathematical Monospace ()fula`)
- Fula (
The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.
Contributions are welcome! Please read our contribution guidelines before submitting a pull request.