Returns a given number in words. To choose a language use the -l
option.
Supported languages can be found in dicts
. Default language is English.
This project is work in progress so if it's impossible to implement a dict for a particular language please open an issue.
cargo install numatim
Dicts should have two main sections:
If a certain number's or power's declination needs to be hardcoded it must be put inside an array. How exactly that must be done can be found in particular sections. Take a look at the dicts folder for a real life examples.
Numbers must contain 3 arrays of strings:
[tenth, rest]
eg. ["twelve", "twenty"]
Put all your powers of thousand here. Amount of them is truly arbitrary.
[1, 2-4, 5-9]
, for now it can't be omitted.[1, 2-4, 5-9]
(2-4 will also be used for numbers in range 10-19).