Convert numbers to Persian words
- | - |
---|---|
📺 | Preview |
📱 | Compatibility |
💻 | Usage |
📩 | Download |
📋 | Features |
🧾 | Changelog |
🏆 | Credits |
⚖️ | License |
Android Jellybean 4.1+/SDK 16+
Kotlin
You just need to create an instance from Digits
class and call spellToFarsi
method. input can be any
number in different data types like Byte
, Short
, Int
, Long
, Float
, Double
, BigInteger
, BigDecimal
or numbers as a String
.
val word1: String = Digits().spellToFarsi(input)
val word2: String = Digits().spellToFarsi(12) // دوازده
//دوازده میلیارد و یک صد و بیست و سه میلیون و سی صد و دوازده هزار و یک صد و بیست و سه
val word3: String = Digits().spellToFarsi(12_123_312_123)
//پنج میلیون و یک صد و بیست و یک هزار و سی صد و بیست و یک
val word4: String = Digits().spellToFarsi("5121321")
//چهارده هزار و پانصد ریال
val money1: String = Digits().spellToIranMoney("14500")
//چهارده هزار و پانصد تومان
val money2: String = Digits().spellToIranMoney("14500", IranCurrency.TOMAN)
//سه ممیز چهارده، صدم
val decimalWord: String = Digits().spelltoFarsi(3.14)
in Kotlin, you can also take advantage of extension methods like so:
500.spell()
"12.51".spell()
Java
String persianNumber=new Digits().spellToFarsi("1231");
Find the latest version from Maven Artifact
Step 1. Add the Maven repository to your build file
Add it in your root build.gradle at the end of repositories:
repositories {
mavenCentral()
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.yamin8000:PrettyPersianNumbers:$digits_last_version'
}
Add the dependency
<dependency>
<groupId>com.github.yamin8000</groupId>
<artifactId>PrettyPersianNumbers</artifactId>
<version>$digits_last_version</version>
<type>aar</type>
</dependency>
dependencies {
implementation("com.github.yamin8000:PrettyPersianNumbers:$digits_last_version")
}
BigInteger
can be converted to Persian words using this library From
Zero to Vigintillion
or moreByte
, Short
, Int
, Long
, Float
, Double
, BigInteger
, BigDecimal
Pretty Persian Numbers is licensed under the GNU General
Public License v3.0
Permissions of this strong copyleft license are conditioned on making
available complete source code of licensed works and modifications,
which include larger works using a licensed work, under the same
license. Copyright and license notices must be preserved. Contributors
provide an express grant of patent rights.
Thanks goes to these wonderful people (emoji key):
Yaghoob Siahmargooei 🐛 💻 |
YaMiN 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
HarfBuzz text shaping engine
An alternative YouTube front end, for Android. [WIP]
Both client and server side of the “Vajehh” web application: the search engine for writers.
This is a Fake-Copy of a persian telegram ChatBot called 'برنامه ناشناس' .
Android Persian Calendar / تقویم فارسی اندروید
A simple notepad application with multi-tab to work with Farsi (Persian) plain text files.
کتابخانه ها و مستندات مربوط به روال پرداخت یاری شاپرک - طبق مستندات رسمی شاپرک
DNSLab سایت داینامیک دیاناس