German Number to Words JavaScript
3 German locales — Germany, Austria, Switzerland.
| Locale | Country | Currency |
|---|---|---|
de-DE | Germany | Euro |
de-AT | Austria | Euro |
de-CH | Switzerland | Swiss Franc |
Install
bash
npm install to-wordsBasic Conversion
js
import { ToWords } from 'to-words';
const tw = new ToWords({ localeCode: 'de-DE' });
tw.convert(12345);
// "Zwölf Tausend Drei Hundert Fünf Und Vierzig"
tw.convert(1234.56, { currency: true });
// "Ein Tausend Zwei Hundert Vier Und Dreißig Euro Und Sechsundfünfzig Cent"FAQ
Q: What is the difference between de-DE, de-AT, de-CH?
A: Primarily the currency name. de-CH uses Swiss Franc (Franken) instead of Euro.