1.0.3 • Published 3 years ago

@targetprocess/intl v1.0.3

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

Description

This library contains tools that help to apply generated localization dictionaries to your frontend service

Install

npm install @targetprocess/intl

Usage

import {createIntl} from '@targetprocess/intl';

import de from 'localization/dict/de/de.json';
import en from 'localization/dict/en/en.json';
import es from 'localization/dict/es/es.json';

const dictionaries = new Map<string, Map<string, string>>([
    ['de', new Map(Object.entries(de))],
    ['en', new Map(Object.entries(en))],
    ['es', new Map(Object.entries(es))],
]);

export default createIntl(dictionaries, 'en');