npm-globalization
v0.1.8
Published
A Capacitor plugin designed to provide comprehensive globalization features, enabling developers to easily access and utilize locale data, internationalization, and localization functionalities within their Ionic applications. This plugin facilitates the
Downloads
12
Maintainers
Readme
globalization
A Capacitor plugin designed to provide comprehensive globalization features, enabling developers to easily access and utilize locale data, internationalization, and localization functionalities within their Ionic applications. This plugin facilitates the handling of date and time formats, number formats, currency values, and text directionality based on the user's locale settings, enhancing the global reach and user experience of mobile apps.
Install
npm install globalization
npx cap sync
API
formatDateWithPreferredFormat(...)
formatDateWithPreferredFormat(_options: { date: string; returnTime: boolean; }) => Promise<{ value: string; }>
| Param | Type |
| -------------- | --------------------------------------------------- |
| _options
| { date: string; returnTime: boolean; } |
Returns: Promise<{ value: string; }>
formatMoneyWithPreferredCurrency(...)
formatMoneyWithPreferredCurrency(_options: { value: number; decimals: number; }) => Promise<{ value: string; }>
| Param | Type |
| -------------- | ------------------------------------------------- |
| _options
| { value: number; decimals: number; } |
Returns: Promise<{ value: string; }>
getCurrencyConfig()
getCurrencyConfig() => Promise<{}>
Returns: Promise<{}>