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

@gasket/intl

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasket/intl

Internationalization managers for translation files and locale handling.

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-78.16%
Maintainers
0
Weekly downloads
 
Created
Source

@gasket/intl

Provides internationalization managers for translation files and locale handling.

Installation

npm i @gasket/intl @gasket/plugin-intl

See @gasket/plugin-intl for more information on how to configure the plugin.

Usage

With a intl.js built by @gasket/plugin-intl, you can use the manager to get provide messages for locales.

To get all messages for a locale:

import intlManager from '../path/to/intl.js';

const messages = intlManager.getLocale('en-US').getAllMessages();

LocaleHandler

This will return a handler with the following methods:


// Access a locale handler
const localeHandler = intlManager.getLocale('en-US');

// locale files can be dynamically loaded
await localeHandler.load('locales/examples')

// Get all loaded messages for a locale
localeHandler.getAllMessages();

TODO: more examples coming

License

MIT

Keywords

FAQs

Package last updated on 18 Dec 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