Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@intl-schematic/plugin-defaults

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intl-schematic/plugin-defaults

This is a collection of plugins that should be of use to most applications in need of being localized.

  • 1.0.0-rc.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@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
  • @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.

Keywords

FAQs

Package last updated on 06 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc