|
|
пре 3 година | |
|---|---|---|
| .. | ||
| .circleci | пре 3 година | |
| .github | пре 3 година | |
| .vscode | пре 3 година | |
| dist | пре 3 година | |
| src | пре 3 година | |
| .DS_Store | пре 3 година | |
| .all-contributorsrc | пре 3 година | |
| .codeclimate.yml | пре 3 година | |
| .coveralls.yml | пре 3 година | |
| .prettierrc | пре 3 година | |
| CHANGELOG.md | пре 3 година | |
| LICENSE | пре 3 година | |
| README.md | пре 3 година | |
| icu.macro.js | пре 3 година | |
| package.json | пре 3 година | |
| react-i18next.js | пре 3 година | |
| react-i18next.min.js | пре 3 година | |
| rollup.config.js | пре 3 година | |
| tsconfig.json | пре 3 година | |
| tsconfig.nonEsModuleInterop.json | пре 3 година | |
| tslint.json | пре 3 година | |
Master Branch is the new v10 using hooks.
$ v10.0.0
npm i react-i18next
react-native: not yet supports hooks (hooks are part of react-native v0.59.0)!!!
For the legacy version please use the v9.x.x Branch
$ v9.0.10 (legacy)
npm i react-i18next@legacy
The documentation is published on react.i18next.com
Before: Your react code would have looked something like:
...
<div>Just simple content</div>
<div>
Hello <strong title="this is your name">{name}</strong>, you have {count} unread message(s). <Link to="/msgs">Go to messages</Link>.
</div>
...
After: With the trans component just change it to:
...
<div>{t('simpleContent')}</div>
<Trans i18nKey="userMessagesUnread" count={count}>
Hello <strong title={t('nameTitle')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>.
</Trans>
...
Head over to the interactive playground at codesandbox.
Want to learn more about how seamless your internationalization and translation process can be?
Source can be loaded via npm or downloaded from this repo.
# npm package
$ npm install react-i18next
window.reactI18nextThanks goes to these wonderful people (emoji key):
Jan Mühlemann 💻 💡 📖 💬 |
Adriano Raiano 💻 💡 📖 💬 |
Isaac Hinman 💻 💡 💬 |
Kevin Ross 💬 💻 |
Matheus Schettino 💻 💬 |
|---|
This project follows the all-contributors specification. Contributions of any kind welcome!
localization as a service - locize.com
Needing a translation management? Want to edit your translations with an InContext Editor? Use the orginal provided to you by the maintainers of i18next!
With using locize you directly support the future of i18next and react-i18next.