mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
23
README.rst
23
README.rst
@@ -5,10 +5,9 @@ num2words - Convert numbers to words in multiple languages
|
|||||||
:target: https://travis-ci.org/savoirfairelinux/num2words
|
:target: https://travis-ci.org/savoirfairelinux/num2words
|
||||||
|
|
||||||
``num2words`` is a library that converts numbers like ``42`` to words like
|
``num2words`` is a library that converts numbers like ``42`` to words like
|
||||||
``forty-two``. It supports multiple languages (English, Arabic, Danish, French,
|
``forty-two``. It supports multiple languages (see the list below for full list
|
||||||
German, Hebrew, Italian, Latvian, Norwegian, Polish, Portuguese, Russian,
|
of languages) and can even generate ordinal numbers like ``forty-second``
|
||||||
Spanish and Lithuanian) and can even generate ordinal numbers like
|
(although this last feature is a bit buggy for some languages at the moment).
|
||||||
``forty-second`` (altough this last feature is a bit buggy at the moment).
|
|
||||||
|
|
||||||
The project is hosted on https://github.com/savoirfairelinux/num2words
|
The project is hosted on https://github.com/savoirfairelinux/num2words
|
||||||
|
|
||||||
@@ -47,17 +46,21 @@ cardinal one.
|
|||||||
|
|
||||||
**lang:** The language in which to convert the number. Supported values are:
|
**lang:** The language in which to convert the number. Supported values are:
|
||||||
|
|
||||||
|
* ``en`` (English, default)
|
||||||
* ``ar`` (Arabic)
|
* ``ar`` (Arabic)
|
||||||
* ``de`` (German)
|
* ``de`` (German)
|
||||||
* ``dk`` (Danish)
|
* ``dk`` (Danish)
|
||||||
* ``en`` (English, default)
|
* ``en_GB`` (English - Great Britain)
|
||||||
* ``en_GB`` (British English)
|
* ``en_IN`` (English - India)
|
||||||
* ``en_IN`` (Indian English)
|
|
||||||
* ``es`` (Spanish)
|
* ``es`` (Spanish)
|
||||||
|
* ``es_CO`` (Spanish - Colombia)
|
||||||
|
* ``es_VE`` (Spanish - Venezuela)
|
||||||
|
* ``eu`` (EURO)
|
||||||
* ``fr`` (French)
|
* ``fr`` (French)
|
||||||
* ``fr_CH`` (Swiss French)
|
* ``fr_CH`` (French - Switzerland)
|
||||||
* ``fr_DZ`` (Argelia French)
|
* ``fr_DZ`` (French - Algeria)
|
||||||
* ``he`` (Hebrew)
|
* ``he`` (Hebrew)
|
||||||
|
* ``id`` (Indonesian)
|
||||||
* ``it`` (Italian)
|
* ``it`` (Italian)
|
||||||
* ``lt`` (Lithuanian)
|
* ``lt`` (Lithuanian)
|
||||||
* ``lv`` (Latvian)
|
* ``lv`` (Latvian)
|
||||||
@@ -65,6 +68,8 @@ cardinal one.
|
|||||||
* ``pl`` (Polish)
|
* ``pl`` (Polish)
|
||||||
* ``pt_BR`` (Brazilian Portuguese)
|
* ``pt_BR`` (Brazilian Portuguese)
|
||||||
* ``ru`` (Russian)
|
* ``ru`` (Russian)
|
||||||
|
* ``tr`` (Turkish)
|
||||||
|
* ``vn`` (Vietnamese)
|
||||||
|
|
||||||
You can supply values like ``fr_FR``, the code will be correctly interpreted. If
|
You can supply values like ``fr_FR``, the code will be correctly interpreted. If
|
||||||
you supply an unsupported language, ``NotImplementedError`` is raised.
|
you supply an unsupported language, ``NotImplementedError`` is raised.
|
||||||
|
|||||||
Reference in New Issue
Block a user