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

17.0.8 • Public • Published

react-i18next Tweet

CI 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

Advice:

If you don't like to manage your translation files manually or are simply looking for a better management solution, take a look at i18next-locize-backend. The i18next backend plugin for 🌐 Locize ☁️ — built by the same team behind react-i18next, with CDN delivery, AI translation, and no redeploys for copy changes.

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. Now with a Free plan for your side projects!

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

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

Now with a Free plan for small projects! Perfect for hobbyists or getting started.

Locize

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


Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
17.0.81,825,742latest
9.0.1018,957legacy
10.0.0-alpha.310next

Version History

VersionDownloads (Last 7 Days)Published
17.0.81,825,742
17.0.7180,686
17.0.6305,001
17.0.51,372
17.0.4165,522
17.0.349,940
17.0.2261,029
17.0.128,369
17.0.04,257
16.6.61,104,016
16.6.580,130
16.6.4186
16.6.3581
16.6.232,989
16.6.19,861
16.6.06,151
16.5.8191,914
16.5.73,438
16.5.665,202
16.5.512,160
16.5.4757,322
16.5.3143,889
16.5.227,713
16.5.182,176
16.5.0151,200
16.4.118,139
16.4.033,663
16.3.595,653
16.3.42,903
16.3.326,878
16.3.21,505
16.3.16,045
16.3.02,278
16.2.441,395
16.2.312,699
16.2.23,156
16.2.112,494
16.2.09,024
16.1.69,397
16.1.53,123
16.1.410,127
16.1.33,308
16.1.21,057
16.1.1713
16.1.07,808
16.0.119,230
16.0.072,206
15.7.41,684,092
15.7.3202,830
15.7.224,806
15.7.115,242
15.7.01,282
15.6.1534,115
15.6.068,722
15.5.390,293
15.5.261,183
15.5.1120,982
15.5.0739
15.4.1242,087
15.4.0208,789
15.3.0589
15.2.043,738
15.1.4150,213
15.1.314,800
15.1.27,147
15.1.131,543
15.1.037,768
15.0.313,224
15.0.270,552
15.0.154,109
15.0.022,348
14.1.3864,599
14.1.281,925
14.1.125,616
14.1.070,894
14.0.83,820
14.0.792
14.0.65
14.0.530,742
14.0.4483
14.0.31,477
14.0.2165,467
14.0.111,764
14.0.023,564
13.5.0778,172
13.4.12,452
13.4.0285
13.3.21,586
13.3.127,099
13.3.010,610
13.2.236,883
13.2.12,259
13.2.06,992
13.1.29,139
13.1.1399
13.1.041
13.0.311,181
13.0.216,080
13.0.113,706
13.0.05,361
12.3.1464,216
12.3.055
12.2.226,093
12.2.1102
12.2.036,914
12.1.58,739
12.1.430,579
12.1.36
12.1.25,272
12.1.19,057
12.1.0369
12.0.019,035
11.18.6745,447
11.18.511,794
11.18.47,809
11.18.39,260
11.18.291
11.18.14,875
11.18.04,369
11.17.43,559
11.17.33,107
11.17.216,664
11.17.17,732
11.17.01,861
11.16.111,082
11.16.10587
11.16.99,792
11.16.8982
11.16.714,181
11.16.613,188
11.16.51,877
11.16.46,310
11.16.3161
11.16.24,946
11.16.12,273
11.16.05
11.15.71,564
11.15.63,145
11.15.54,203
11.15.44,110
11.15.36,912
11.15.2517
11.15.15,504
11.15.0124
11.14.333,256
11.14.24,291
11.14.1741
11.14.081
11.13.04,527
11.12.013,880
11.11.48,101
11.11.3803
11.11.2109
11.11.11,305
11.11.05,258
11.10.05,591
11.9.0868
11.8.1557,109
11.8.1439
11.8.133,662
11.8.124,665
11.8.11103
11.8.102,472
11.8.9556
11.8.81,122
11.8.7470
11.8.6828
11.8.53,640
11.8.42,061
11.8.3129
11.8.249
11.8.133
11.8.052
11.7.4299
11.7.33,669
11.7.22,520
11.7.1142
11.7.06,009
11.6.0225
11.5.1180
11.5.0825
11.4.01,597
11.3.51,164
11.3.41,008
11.3.31,380
11.3.273
11.3.1868
11.3.0581
11.2.72,635
11.2.635
11.2.52,006
11.2.45
11.2.30
11.2.2150
11.2.11,261
11.2.014
11.1.0128
11.0.1900
11.0.0129
10.13.226,578
10.13.1663
10.13.0288
10.12.51,062
10.12.426
10.12.3209
10.12.2810
10.12.19
10.12.02
10.11.543
10.11.46,878
10.11.315
10.11.2291
10.11.124
10.11.0460
10.10.0455
10.9.124
10.9.0311
10.8.116
10.8.030
10.7.0113
10.6.280
10.6.1207
10.6.043
10.5.3627
10.5.255
10.5.110
10.5.0119
10.4.21
10.4.11
10.4.00
10.3.19
10.3.029
10.2.151
10.2.085
10.1.2222
10.1.13
10.1.00
10.0.5248
10.0.45
10.0.30
10.0.21
10.0.17
10.0.064
10.0.0-alpha.310
10.0.0-alpha.21
10.0.0-alpha.11
9.0.1018,957
9.0.910
9.0.80
9.0.70
9.0.635
9.0.50
9.0.444
9.0.323
9.0.286
9.0.1103
9.0.01
8.4.04,672
8.3.99
8.3.8370
8.3.72
8.3.611
8.3.531
8.3.40
8.3.30
8.3.20
8.3.12
8.3.00
8.2.00
8.1.24
8.1.11
8.1.048
8.0.8101
8.0.7102
8.0.677
8.0.50
8.0.40
8.0.30
8.0.20
8.0.10
8.0.00
7.13.05,356
7.12.0112
7.11.123
7.11.085
7.10.1242
7.10.00
7.9.14
7.9.080
7.8.18
7.8.032
7.7.0474
7.6.1147
7.6.084
7.5.1495
7.5.033
7.4.0333
7.3.693
7.3.52
7.3.4114
7.3.32
7.3.21
7.3.159
7.3.011
7.2.01
7.1.1206
7.1.014
7.0.2284
7.0.11
7.0.016
6.2.0374
6.1.025
6.0.6159
6.0.57
6.0.41
6.0.31
6.0.21
6.0.11
6.0.01
5.4.178
5.4.04
5.3.02
5.2.011
5.1.06
5.0.02
4.8.0329
4.7.03
4.6.48
4.6.31
4.6.217
4.6.12
4.6.01
4.5.01
4.4.01
4.3.02
4.2.01
4.1.21
4.1.11
4.1.02
4.0.02
3.1.2489
3.1.17
3.1.05
3.0.03
2.2.357
2.2.21
2.2.12
2.2.06
2.1.03
2.0.15
2.0.03
1.11.086
1.10.154
1.10.01
1.9.01
1.8.01
1.7.01
1.6.313
1.6.21
1.6.11
1.6.01
1.5.31
1.5.21
1.5.11
1.5.01
1.4.21
1.4.16
1.4.02
1.3.11
1.3.01
1.2.115
1.2.01
1.1.01
1.0.11
1.0.01
0.1.03
0.0.43
0.0.31
0.0.21
0.0.11
0.0.03