Skip to content

Latest commit

 

History

History

defaults

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@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

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.