@jil/translate
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@jil/translate

Package and application level translations made easy. Wraps the powerful i18next library to abstract complexity away and define common server-side settings.

import {createTranslator} from '@jil/translate';

const msg = createTranslator(['common', 'errors'], '../path/to/resources');

msg('common:welcome', {name: 'Jil'}); // Hello Jil!

Features

  • Isolated translator instances.
  • Namespace aware resource bundles.
  • Automatic locale detection, from command line options, or from the operating system.
  • Supports multiple file types: JavaScript, JSON, YAML.
  • Message interpolation, pluralization, nesting, and more.
  • Plus all other features found in i18next!

Installation

npm i @jil/translate

Documentation

Readme

Keywords

none

Package Sidebar

Install

npm i @jil/translate

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

31.1 kB

Total Files

31

Last publish

Collaborators

  • towyuan