@targetprocess/intl
v1.0.3
Published
Auxiliary module for working with dictionaries
Downloads
806
Readme
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');