2.8.1 • Published 6 months ago

@xlit/intl v2.8.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@xlit/intl

Work with internationalization

Installation

npm i @xlit/intl

Getting started

import { Intl } from '@xlit/intl';

const SUPPORTED_LOCALES = ['id', 'en'];
const BROWSER_SUPPORTED_LANGUAGES = [...navigator.languages];

await Intl.instance()
  .registerMulti('main', {
    id: () => import('./locales/id.js'),
    en: () => import('./locales/en.js'),
  })
  .detect(BROWSER_SUPPORTED_LANGUAGES, SUPPORTED_LANGUAGES)
  .resolve();

t('foo'); // foo
t('bar $0', 'baz'); // bar baz
2.8.1

6 months ago

2.8.0

6 months ago

2.7.5

7 months ago

2.7.4

7 months ago

2.7.3

7 months ago

2.7.2

7 months ago

2.7.1

7 months ago

2.7.0

7 months ago

2.6.14

7 months ago

2.6.13

7 months ago

2.6.12

7 months ago

2.6.11

8 months ago

2.6.10

8 months ago

2.6.9

8 months ago

2.6.8

8 months ago

2.6.7

8 months ago

2.6.6

8 months ago

2.6.5

8 months ago