amount-to-words-multilang
Version:
Convert numbers to words in multiple languages (EN, TH, FR, JA, DE, ET, ES, FA, ZH)
13 lines (10 loc) • 306 B
text/typescript
export type SupportedLocale = 'en' | 'th' | 'fr' | 'ja' | 'de' | 'et' | 'es' | 'fa' | 'zh';
export interface LocaleConverter {
convert(amount: number): string;
}
export interface ConversionOptions {
locale?: SupportedLocale;
majorUnit?: string;
minorUnit?: string;
showMinorIfZero?: boolean;
}