Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/benjaminnoufel/translation
- Owner: benjaminnoufel
- License: mit
- Created: 2021-02-21T13:48:43.000Z (almost 4 years ago)
- Default Branch: next
- Last Pushed: 2023-03-05T21:19:08.000Z (almost 2 years ago)
- Last Synced: 2024-11-18T10:59:37.170Z (about 1 month ago)
- Topics: eslint, hooks, i18n, internationalization, jsx, language, node, react, react-hooks, translate, translation, translator, tsx, typescript
- Language: TypeScript
- Homepage:
- Size: 1.02 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
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/