1.0.0-rc.7 • Published 4 months ago
@intl-schematic/plugin-defaults v1.0.0-rc.7
@intl-schematic/plugin-defaults
This is a collection of plugins that should be of use to most applications in need of being localized.
npm i -s @intl-schematic/plugin-defaults
Included plugins
@intl-schematic/plugin-arrays
- use plain functions directly in translation documents with type-checked parameters
@intl-schematic/plugin-locale
- provider plugin, allows other plugins to use the provided
Intl.Locale
instance
- provider plugin, allows other plugins to use the provided
@intl-schematic/plugin-processors
- apply custom and default processors to format the user inputs
This package also exports everything from the included plugins.
Usage
import { createTranslator } from 'intl-schematic';
import { defaultPlugins } from '@intl-schematic/plugin-defaults';
const getLocale = () => new Intl.Locale(navigator.language);
// Notice the plugins array parameter
const t = createTranslator(getDocument, defaultPlugins(getLocale));
Then use according to the instructions of included plugins.
1.0.0-rc.7
4 months ago
1.0.0-rc.6
4 months ago
1.0.0-rc.5
4 months ago
1.0.0-rc.3
4 months ago
1.0.0-rc.4
4 months ago
1.0.0-rc.2
5 months ago
1.0.0-rc.1
5 months ago