Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/benjaminnoufel/translation

This is a library for translating text for React.
https://github.com/benjaminnoufel/translation

eslint hooks i18n internationalization jsx language node react react-hooks translate translation translator tsx typescript

Last synced: 10 days ago
JSON representation

This is a library for translating text for React.

Awesome Lists containing this project

README

        

# Translation

This is a library for translating text.

![Code Style CI](https://github.com/benjaminnoufel/translation/workflows/Code%20Style%20CI/badge.svg)
![Test CI](https://github.com/benjaminnoufel/translation/workflows/Test%20CI/badge.svg)
![Package](https://github.com/benjaminnoufel/translation/workflows/Package/badge.svg)
![Package npmjs](https://github.com/benjaminnoufel/translation/workflows/Package%20npmjs/badge.svg)

## Summary

- [Requirements](#requirements)
- [Installation](#installation)
- [NPM](#using-npm)
- [Yarn](#using-yarn)
- [Config options](#config-options)
- [Examples](#examples)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [License](#license)

## Requirements

- [NPM][npm] or [Yarn][yarn]

## Installation

### Using npm:

```console
$ npm install --save @benjaminnoufel/translation
```

### Using yarn:

```console
$ yarn add @benjaminnoufel/translation
```

## Config options

| key | value | default |
| ------ | ----- | ------ |
| locale | string | en |
| fallbackLng | string | en |
| separator | string | . |
| fallbackMsg | string | TODO{separator}{word}{locale} or ""|
| messages | object | {} |

:warning: messages must respect the JSON norm

## Examples

see [`Examples`](./examples)

## Changelog

see [`CHANGELOG`](./CHANGELOG.md)

## Contributing

see [`CONTRIBUTING`](./CONTRIBUTING.md)

## License

see [`LICENSE`](./LICENSE)

[npm]: https://www.npmjs.com/
[yarn]: https://yarnpkg.com/