From Numbers to Number Names
This is a soros programming language ruby interpreter.
Soros programming language is based on regular expressions
2300.to_word # => two thousand three hundred
7654.to_word # => seven thousand six hundred fifty-four
Add this line to your application's Gemfile:
gem 'numbertext'
And then execute:
$ bundle
Or install it yourself as:
$ gem install numbertext
Default locale is English
2300.to_word # => two thousand three hundred
Set other language
2300.to_word(locale: :ru) # => две тысячи триста
2300.to_word(locale: :pl) # => dwa tysiące trzysta
2300.to_word(locale: :de) # => zweitausenddreihundert
2300.to_word(locale: :it) # => duemilatrecento
Afrikaans
Български
Català
Česky
Dansk
Deutsch
Deutsch (CH)
Ελληνικά
English
English (GB)\
English (IN)
Esperanto
Español
Eesti
Suomi
Français
Français (BE)
Français (CH)
Galego
עברית
Hrvatski
Magyar
Bahasa Indonesia
Íslenska
Italiano
日本語
한국어 (KR)
한국어 (KP)
Luxembourgish
Lietuvių
Latviešu
Bahasa Melayu
Nederlands
Bokmål
Nynorsk
Polski
Português
Português (BR)
Română
Русский
Srpski
Slovenščina
Shqip
Српски
Svenska
ไทย
Türkçe
Українська
Tiếng Việt
大写
Roman*
花碼*
*Old numeral systems (extended for large numbers) – Old Hungarian, Roman and Suzhou numerals
Bug reports and pull requests are welcome on GitHub at https://github.com/zumkorn/numbertext.
The gem is available as open source under the terms of the MIT License.
You can read the license for locale files and soros programming language here.