-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why, in case of an error in the url, local translations are not loaded? #71
Comments
Here it seems to work: https://github.com/i18next/i18next-http-backend/blob/master/example/fallback/app.js So please provide a full reproducible example. |
Your example is on the server, and I'm solving the problem in a React Native mobile app. The example is complete and there is nothing to add. |
Sorry, I can't reproduce your issue... What is the log saying whe setting debug to true? |
btw: your url seems not to be broken to me: example with en => https://translation.rightwayhealthcare.com/en.json |
Yes, a worker, but if I break it like this
then local translation is not connected |
Just tested with that url too: "https://transl1ation.rightwayhealthcare.com/en.json" it works for me. Please share at least the debug log. I can't help you, without more information or a reproducible example. |
the first line in your screenshot shows the translations of en are loaded Is there any error before this? Is it possible you're not waiting for the translations to be loaded? When not using Suspense, you need to wait for the ready flag to be true before rendering: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Disable RN Debugger. Plugin don't work if RN Debugger enabled. |
I bumped into this issue today as well, I was banging my head against the wall until I found your comment @NeRo8 (thanks!!!). Disabling RN debugger did the trick, but that's not an acceptable solution. In my case, I'll revert to Would it be reasonable to be able to opt-out of fetch API and use the XMLHttpRequest fallback only? @adrai |
If I understood correctly this will never happen in a "productive" environment. It's just a debug/dev issue. |
Yea, this is only an issue during development. I'm not sure we'll see the light for a fix with the debugger in any near future, it seems pretty complicated... Anyway, you're probably right, shouldn't try to "fix" it from this repository. I noticed the "request" option, does that completely replace fetch with a custom function? If yes, I could utilize that to implement a client that works with react native debugger. |
Yes |
Why, in case of an error in the url, local translations are not loaded?
My settings:
example broken url:
loadPath: 'https://tran1slation.rightwayhealthcare.com/{{lng}}.json',
As I do in this case, the local translation should be connected, but it doesn't.
Where am I going wrong?
The text was updated successfully, but these errors were encountered: