https://github.com/igogo5yo/node-intl
This library give you simple interface to work with intl.js and intl-messageformat.
https://github.com/igogo5yo/node-intl
intl intl-format intl-messageformat intl-node intljs node node-intl node-js nodejs
Last synced: 3 months ago
JSON representation
This library give you simple interface to work with intl.js and intl-messageformat.
- Host: GitHub
- URL: https://github.com/igogo5yo/node-intl
- Owner: igogo5yo
- Created: 2017-09-14T10:37:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-31T20:59:24.000Z (9 months ago)
- Last Synced: 2025-07-11T15:58:01.669Z (3 months ago)
- Topics: intl, intl-format, intl-messageformat, intl-node, intljs, node, node-intl, node-js, nodejs
- Language: TypeScript
- Homepage:
- Size: 35.2 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodeIntl
[](https://travis-ci.org/igogo5yo/node-intl)
[](https://www.npmjs.com/package/node-intl)
[](https://www.npmjs.com/package/node-intl)This library give you simple interface to work with intl.js and intl-messageformat.
## Usage
Install the package via NPM: `npm i node-intl`.
```js
const intl = NodeIntl.instance; // Create instanceintl.locale = 'en-US'; // set locale
intl.messages = {...}; // set messages
intl.addMessages({...}); // add new messages
intl.addMessagesFromFile('path/to/file'); // add new messages from file
intl.formatMessage('device.name', {prop: 'Name'}); // format messages
```