Socket
Book a DemoInstallSign in
Socket

@sensorfactdev/i18n

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sensorfactdev/i18n

Internationalisation client for translations managed in GraphQL

Source
npmnpm
Version
3.0.4
Version published
Weekly downloads
42
-74.55%
Maintainers
4
Weekly downloads
 
Created
Source

Sensorfact i18n

npm version Build Status Coverage Status

Install

yarn add @sensorfactdev/i18n

Example

import { getI18n } from '@sensorfactdev/i18n';

const translations = [
  {
    key: 'some.id.you.want.to.translate',
    en_GB: 'Translated into English',
    nl_NL: 'Vertaald naar Nederlands',
  }
]

const i18n = getI18n(translations, 'en_GB');
i18n.text('some.id.you.want.to.translate'); // 'Translated into English'
i18n.number(10000);
i18n.currency(10000, 'EUR');
i18n.date(new Date());

For more usage info check the unit tests or MDN docs on Intl.

FAQs

Package last updated on 30 Sep 2020

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