Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quavedev/react-i18n
React i18n components
https://github.com/quavedev/react-i18n
Last synced: about 2 months ago
JSON representation
React i18n components
- Host: GitHub
- URL: https://github.com/quavedev/react-i18n
- Owner: quavedev
- Created: 2022-09-18T18:23:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-18T18:57:36.000Z (over 2 years ago)
- Last Synced: 2023-03-06T22:23:46.909Z (almost 2 years ago)
- Language: JavaScript
- Size: 655 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React i18n components
## Usage
### Adding npm dependency in your project
```shell
npm i @quave/react-i18n
``````javascript
import { ENGLISH, PORTUGUESE, LanguageChange, useTranslate, Store } from '@quave/react-i18n';export const TERMS = {
pageTitle: {
[ENGLISH]: 'English page title',
[PORTUGUESE]: 'Título da página em português',
},
};const LanguageTest = () => {
const { i18n } = useTranslate();
return{i18n('pageTitle')};
};export const App = () => (
);
```