Skip to content

Commit 5804f64

Browse files
committed
troubleshooting advice
1 parent 647da65 commit 5804f64

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,26 @@ i18next.init({
4242
})
4343
```
4444

45+
**Slow i18next initialization?**
46+
47+
The chance is high, that your http requests fails. In that case i18next retries a couple of times before finishing the initialization.
48+
You have 2 options to address this:
49+
50+
*1) The correct way:*
51+
Analyze your http requests and fix them. (Wrong path? Wrong server implementation? etc...)
52+
53+
*2) Configure i18next to not retry:*
54+
Modify the `retryTimeout` and/or `maxRetries` to match your needs. (i.e. set `maxRetries: 1`)
55+
56+
```js
57+
i18next.init({
58+
// ...
59+
retryTimeout: 350,
60+
maxRetries: 5,
61+
// ...
62+
})
63+
```
64+
4565
# Getting started
4666

4767
Source can be loaded via [npm](https://www.npmjs.com/package/i18next-http-backend) or [downloaded](https://github.com/i18next/i18next-http-backend/blob/master/i18nextHttpBackend.min.js) from this repo.

0 commit comments

Comments
 (0)