react-i18next
TypeScript icon, indicating that this package has built-in type declarations

15.5.1 • Public • Published

react-i18next Tweet

CI Code Climate Coverage Status Quality npm

IMPORTANT:

Master Branch is the newest version using hooks (>= v10).

$ >=v10.0.0
npm i react-i18next

react-native: To use hooks within react-native, you must use react-native v0.59.0 or higher

For the legacy version please use the v9.x.x Branch

$ v9.0.10 (legacy)
npm i react-i18next@legacy

Documentation

The documentation is published on react.i18next.com and PR changes can be supplied here.

The general i18next documentation is published on www.i18next.com and PR changes can be supplied here.

What will my code look like?

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>
...

📖 What others say

Why i18next?

  • Simplicity: no need to change your webpack configuration or add additional babel transpilers, just use create-react-app and go.
  • Production ready we know there are more needs for production than just doing i18n on the clientside, so we offer wider support on serverside too (nodejs, php, ruby, .net, ...). Learn once - translate everywhere.
  • Beyond i18n comes with locize bridging the gap between development and translations - covering the whole translation process.

ecosystem

Localization workflow

Want to learn more about how seamless your internationalization and translation process can be?

video

watch the video

Installation

Source can be loaded via npm or downloaded from this repo.

# npm package
$ npm install react-i18next
  • If you don't use a module loader it will be added to window.reactI18next

Do you like to read a more complete step by step tutorial?

Here you'll find a simple tutorial on how to best use react-i18next. Some basics of i18next and some cool possibilities on how to optimize your localization workflow.

Examples

v9 samples

Requirements

  • react >= 16.8.0
  • react-dom >= 16.8.0
  • react-native >= 0.59.0
  • i18next >= 10.0.0 (typescript users: >=17.0.9)

v9

Core Contributors

Thanks goes to these wonderful people (emoji key):


Jan Mühlemann

💻 💡 👀 📖 💬

Adriano Raiano

💻 💡 👀 📖 💬

Pedro Durek

💻 💡 👀 💬

Tiger Abrodi

💻 👀

This project follows the all-contributors specification. Contributions of any kind are welcome!


Gold Sponsors


localization as a service - locize.com

Needing a translation management? Want to edit your translations with an InContext Editor? Use the original provided to you by the maintainers of i18next!

locize

By using locize you directly support the future of i18next and react-i18next.


Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
15.5.1639,408latest
9.0.109,235legacy
10.0.0-alpha.32next

Version History

VersionDownloads (Last 7 Days)Published
15.5.1639,408
15.5.01,154
15.4.1508,331
15.4.0230,197
15.3.0416
15.2.030,566
15.1.413,691
15.1.330,284
15.1.210,326
15.1.154,818
15.1.038,956
15.0.315,269
15.0.285,753
15.0.181,104
15.0.030,214
14.1.3339,780
14.1.2127,079
14.1.133,609
14.1.0123,551
14.0.81,334
14.0.7216
14.0.63
14.0.544,594
14.0.4319
14.0.31,407
14.0.2135,451
14.0.115,198
14.0.019,804
13.5.0490,560
13.4.14,097
13.4.0976
13.3.23,584
13.3.123,788
13.3.016,657
13.2.239,748
13.2.13,661
13.2.08,774
13.1.28,206
13.1.1506
13.1.0590
13.0.312,258
13.0.220,907
13.0.113,951
13.0.06,305
12.3.1354,493
12.3.0282
12.2.233,925
12.2.1112
12.2.050,428
12.1.528,442
12.1.417,453
12.1.33
12.1.231,889
12.1.111,537
12.1.0124
12.0.021,881
11.18.6549,981
11.18.59,295
11.18.410,640
11.18.314,525
11.18.2310
11.18.18,775
11.18.05,305
11.17.42,445
11.17.32,518
11.17.210,184
11.17.15,095
11.17.04,999
11.16.112,632
11.16.1095
11.16.913,819
11.16.81,189
11.16.710,223
11.16.62,621
11.16.52,595
11.16.43,270
11.16.3107
11.16.210,967
11.16.13,338
11.16.09
11.15.72,076
11.15.66,125
11.15.55,548
11.15.45,670
11.15.311,170
11.15.2741
11.15.14,413
11.15.0937
11.14.321,924
11.14.22,729
11.14.1966
11.14.0119
11.13.05,738
11.12.019,027
11.11.412,346
11.11.33,431
11.11.2236
11.11.11,251
11.11.06,900
11.10.07,158
11.9.01,027
11.8.1517,394
11.8.1456
11.8.137,557
11.8.127,323
11.8.11161
11.8.105,006
11.8.9474
11.8.83,199
11.8.72,349
11.8.61,584
11.8.510,440
11.8.41,396
11.8.377
11.8.218
11.8.149
11.8.098
11.7.4275
11.7.35,618
11.7.24,010
11.7.1201
11.7.08,738
11.6.0224
11.5.162
11.5.0701
11.4.07,751
11.3.51,305
11.3.42,669
11.3.33,079
11.3.216
11.3.11,157
11.3.0224
11.2.7684
11.2.681
11.2.5446
11.2.44
11.2.33
11.2.2169
11.2.11,324
11.2.020
11.1.0100
11.0.1553
11.0.0195
10.13.219,756
10.13.1763
10.13.055
10.12.5302
10.12.436
10.12.3205
10.12.23,464
10.12.125
10.12.02
10.11.541
10.11.44,776
10.11.323
10.11.294
10.11.117
10.11.0307
10.10.0224
10.9.1147
10.9.0209
10.8.1163
10.8.072
10.7.0182
10.6.2130
10.6.115
10.6.034
10.5.3140
10.5.2414
10.5.1111
10.5.0119
10.4.29
10.4.14
10.4.03
10.3.118
10.3.027
10.2.14
10.2.0153
10.1.29
10.1.13
10.1.02
10.0.515
10.0.415
10.0.31
10.0.22
10.0.14
10.0.036
10.0.0-alpha.32
10.0.0-alpha.22
10.0.0-alpha.15
9.0.109,235
9.0.93
9.0.87
9.0.76
9.0.611
9.0.51
9.0.432
9.0.33
9.0.2171
9.0.161
9.0.01
8.4.01,893
8.3.912
8.3.8193
8.3.73
8.3.615
8.3.516
8.3.42
8.3.32
8.3.21
8.3.12
8.3.04
8.2.03
8.1.21
8.1.12
8.1.04
8.0.864
8.0.731
8.0.6111
8.0.53
8.0.41
8.0.33
8.0.25
8.0.11
8.0.04
7.13.05,247
7.12.027
7.11.1133
7.11.077
7.10.1338
7.10.02
7.9.14
7.9.020
7.8.113
7.8.05
7.7.072
7.6.1147
7.6.012
7.5.1207
7.5.034
7.4.060
7.3.650
7.3.52
7.3.47
7.3.32
7.3.24
7.3.12
7.3.02
7.2.03
7.1.15
7.1.08
7.0.2675
7.0.16
7.0.015
6.2.0178
6.1.03
6.0.653
6.0.518
6.0.42
6.0.33
6.0.24
6.0.14
6.0.05
5.4.131
5.4.02
5.3.04
5.2.08
5.1.02
5.0.03
4.8.0363
4.7.04
4.6.42
4.6.310
4.6.211
4.6.12
4.6.03
4.5.03
4.4.04
4.3.03
4.2.05
4.1.27
4.1.14
4.1.035
4.0.04
3.1.2408
3.1.14
3.1.09
3.0.06
2.2.347
2.2.21
2.2.13
2.2.05
2.1.01
2.0.11
2.0.04
1.11.085
1.10.1365
1.10.01
1.9.03
1.8.02
1.7.04
1.6.33
1.6.21
1.6.13
1.6.01
1.5.31
1.5.23
1.5.12
1.5.03
1.4.23
1.4.115
1.4.04
1.3.13
1.3.04
1.2.16
1.2.03
1.1.04
1.0.12
1.0.05
0.1.03
0.0.47
0.0.31
0.0.22
0.0.16
0.0.06

Package Sidebar

Install

npm i react-i18next

Weekly Downloads

4,762,274

Version

15.5.1

License

MIT

Unpacked Size

331 kB

Total Files

71

Last publish

Collaborators

  • adrai
  • jamuhl