Template:Digits2text

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Digits2text/doc.

Converts numbers given using digits to their equivalent as spelled words. No output if the number isn't defined. If a number can't be spelled, it will be returned as is.

The template automatically sets the following categories:

Usage

{{Digits2text |n= |lang= }}

Template parameters

ParameterDescriptionDefaultStatus
n
1
integer value (formatted with basic decimal digits 0-9 without any group separator) to spellemptyrequired
langcode of the language into which the number must be spelled{{Int:Lang}}optional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: all users

Localization

Deutsch  English  français  +/−

This template is localized through {{Autotranslate}}.


To add your language to the list of languages supported by this template, please copy the code of Template:Digits2text/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.


Examples in the current user language

  • "{{Digits2text|n=1}}" gives: "one", "{{Digits2text|n=1|ordinal=1}}" gives: "first"
  • "{{Digits2text|n=52}}" gives: "fifty-two", "{{Digits2text|n=52|ordinal=1}}" gives: "fifty-second"
  • "{{Digits2text|n=147}}" gives: "one hundred fourty-seven", "{{Digits2text|n=147|ordinal=1}}" gives: "one-hundred-fourty-seventh"
  • "{{Digits2text|n=2052}}" gives: "two thousand fifty-two", "{{Digits2text|n=2052|ordinal=1}}" gives: "two-thousand-fifty-second"
  • "{{Digits2text|n=9999}}" gives: "nine thousand nine hundred ninety-nine", "{{Digits2text|n=9999|ordinal=1}}" gives: "nine-thousand-nine-hundred-ninety-ninth"
  • "{{Digits2text|n=1000000}}" gives: "one million", "{{Digits2text|n=1000000|ordinal=1}}" gives: "one-millionth"
  • "{{Digits2text|n=12345678}}" gives: "twelve million three hundred fourty-five thousand six hundred seventy-eight", "{{Digits2text|n=12345678|ordinal=1}}" gives: "twelve million three hundred fourty-five thousand six hundred seventy-eight"
  • "{{Digits2text|n=1000000000}}" gives: "one billion", "{{Digits2text|n=1000000000|ordinal=1}}" gives: "one-billionth"
  • "{{Digits2text|n=123456123456789}}" gives: "one hundred twenty-three trillion four hundred fifty-six billion one hundred twenty-three million four hundred fifty-six thousand seven hundred eighty-nine", "{{Digits2text|n=123456123456789|ordinal=1}}" gives: "one hundred twenty-three trillion four hundred fifty-six billion one hundred twenty-three million four hundred fifty-six thousand seven hundred eighty-nine"

Examples in German

Can spell positive and negative integers with up to 15 digits (i.e. numbers lower than one billiard, using the long scale naming).

  • "{{Digits2text|n=1|lang=de}}" gives: "eins", "{{Digits2text|n=1|ordinal=1|lang=en}}" gives: "erste"
  • "{{Digits2text|n=52|lang=de}}" gives: "zweiundfünfzig", "{{Digits2text|n=52|ordinal=1|lang=en}}" gives: "zweiundfünfzigte"
  • "{{Digits2text|n=147|lang=de}}" gives: "einhundert­siebenundvierzig", "{{Digits2text|n=147|ordinal=1|lang=en}}" gives: "einhundert­siebenundvierzigte"
  • "{{Digits2text|n=2052|lang=de}}" gives: "zweitausend­zweiundfünfzig", "{{Digits2text|n=2052|ordinal=1|lang=en}}" gives: "zweitausend­zweiundfünfzigte"
  • "{{Digits2text|n=9999|lang=de}}" gives: "neuntausend­neunhundert­neunundneunzig", "{{Digits2text|n=9999|ordinal=1|lang=en}}" gives: "neuntausend­neunhundert­neunundneunzigte"
  • "{{Digits2text|n=1000000|lang=de}}" gives: "Million", "{{Digits2text|n=1000000|ordinal=1|lang=de}}" gives: "millionte"
  • "{{Digits2text|n=12345678|lang=de}}" gives: "zwölfMillionen dreihundert­fünfundvierzigtausend­sechshundert­achtundsiebzig", "{{Digits2text|n=12345678|ordinal=1|lang=de}}" gives: "zwölfmillion-und-dreihundert­fünfundvierzigtausend­sechshundert­achtundsiebzigte"
  • "{{Digits2text|n=123456123456789|lang=de}}" gives: "hundert­dreiundzwanzig­ Billionen vierhundert­sechsundfünfzig­ Milliarden hundert­dreiundzwanzig­ Millionen vierhundert­sechsundfünfzigtausend­siebenhundert­neunundachtzig", "{{Digits2text|n=123456123456789|ordinal=1|lang=de}}" gives: "hundert­dreiundzwanzig­billion-und-vierhundert­sechsundfünfzig­milliard-und-hundert­dreiundzwanzig­million-und-vierhundert­sechsundfünfzigtausend­siebenhundert­neunundachtzigte"

Examples in English

Can spell positive and negative integers with up to 15 digits (i.e. numbers lower than one quadrillion, using the short scale naming).

  • "{{Digits2text|n=1|lang=en}}" gives: "one", "{{Digits2text|n=1|ordinal=1|lang=en}}" gives: "first"
  • "{{Digits2text|n=52|lang=en}}" gives: "fifty-two", "{{Digits2text|n=52|ordinal=1|lang=en}}" gives: "fifty-second"
  • "{{Digits2text|n=147|lang=en}}" gives: "one hundred fourty-seven", "{{Digits2text|n=147|ordinal=1|lang=en}}" gives: "one-hundred-fourty-seventh"
  • "{{Digits2text|n=2052|lang=en}}" gives: "two thousand fifty-two", "{{Digits2text|n=2052|ordinal=1|lang=en}}" gives: "two-thousand-fifty-second"
  • "{{Digits2text|n=9999|lang=en}}" gives: "nine thousand nine hundred ninety-nine", "{{Digits2text|n=9999|ordinal=1|lang=en}}" gives: "nine-thousand-nine-hundred-ninety-ninth"
  • "{{Digits2text|n=1000000|lang=en}}" gives: "one million", "{{Digits2text|n=1000000|ordinal=1|lang=en}}" gives: "one-millionth"
  • "{{Digits2text|n=12345678|lang=en}}" gives: "twelve million three hundred fourty-five thousand six hundred seventy-eight", "{{Digits2text|n=12345678|ordinal=1|lang=en}}" gives: "twelve-million-three-hundred-fourty-five-thousand-six-hundred-seventy-eighth"
  • "{{Digits2text|n=1000000000|lang=en}}" gives: "one billion", "{{Digits2text|n=1000000000|ordinal=1|lang=en}}" gives: "one-billionth"
  • "{{Digits2text|n=123456123456789|lang=en}}" gives: "one hundred twenty-three trillion four hundred fifty-six billion one hundred twenty-three million four hundred fifty-six thousand seven hundred eighty-nine", "{{Digits2text|n=123456123456789|ordinal=1|lang=en}}" gives: "one-hundred-twenty-three-trillion-four-hundred-fifty-six-billion-one-hundred-twenty-three-million-four-hundred-fifty-six-thousand-seven-hundred-eighty-ninth"

Examples in French

Can spell positive and negative integers with up to 15 digits (i.e. numbers lower than one billiard, using the long scale naming).

  • "{{Digits2text|n=1|lang=fr}}" gives: "un", "{{Digits2text|n=1|ordinal=1|lang=fr}}" gives: "premier"
  • "{{Digits2text|n=52|lang=fr}}" gives: "cinquante-deux", "{{Digits2text|n=52|ordinal=1|lang=fr}}" gives: "cinquante-deuxième"
  • "{{Digits2text|n=147|lang=fr}}" gives: "cent quarante-sept", "{{Digits2text|n=147|ordinal=1|lang=fr}}" gives: "cent-quarante-septième"
  • "{{Digits2text|n=2052|lang=fr}}" gives: "deux mille cinquante-deux", "{{Digits2text|n=2052|ordinal=1|lang=fr}}" gives: "deux-mille-cinquante-deuxième"
  • "{{Digits2text|n=9999|lang=fr}}" gives: "neuf mille neuf cent quatre-vingt-dix-neuf", "{{Digits2text|n=9999|ordinal=1|lang=fr}}" gives: "neuf-mille-neuf-cent-quatre-vingt-dix-neuvième"
  • "{{Digits2text|n=9999|lang=fr-be}}" gives: "nine thousand nine hundred ninety-nine", "{{Digits2text|n=9999|ordinal=1|lang=fr-be}}" gives: "nine-thousand-nine-hundred-ninety-ninth"
  • "{{Digits2text|n=1000000|lang=fr}}" gives: "un million", "{{Digits2text|n=1000000|ordinal=1|lang=fr}}" gives: "un-millionième"
  • "{{Digits2text|n=12345678|lang=fr}}" gives: " douze millions trois cent quarante cinq mille six cent soixante-dix-huit", "{{Digits2text|n=12345678|ordinal=1|lang=fr}}" gives: "-douze-million-trois-cent-quarante-cinq-mille-six-cent-soixante-dix-huitième"
  • "{{Digits2text|n=1000000000|lang=fr}}" gives: "un milliard", "{{Digits2text|n=1000000000|ordinal=1|lang=fr}}" gives: "un-milliardième"
  • "{{Digits2text|n=123456123456789|lang=fr}}" gives: "cent vingt trois billions quatre cent quarante six milliards cent vingt trois millions quatre cent cinquante six mille sept cent quatre-vingt-neuf", "{{Digits2text|n=123456123456789|ordinal=1|lang=fr}}" gives: "cent-vingt-trois-billion-quatre-cent-quarante-six-milliard-cent-vingt-trois-million-quatre-cent-cinquante-six-mille-sept-cent-quatre-vingt-neuvième"