Questions tagged [i18next-http-backend]
42 questions
3
votes
2 answers
'i18next-http-backend' module couldn't be load
Using the following code construct the module 'i18next-http-backend' (installed version: "i18next-http-backend": "^1.4.1") cannot be load, in the browser console I find the following error: "Uncaught Error: You are passing an undefined module!…

user3177247
- 49
- 4
3
votes
2 answers
i18next dealing with multiple translation files nested namespaces
I'm having issues figuring out how to lazy load my translations with i18next.
Here's my setup:
i18n
.use(Backend)
.use(LanguageDetector)
.use(initReactI18next)
.init({
debug: NODE_ENV === 'development',
defaultNS: 'translation',
…

Barry Michael Doyle
- 9,333
- 30
- 83
- 143
2
votes
0 answers
how to use i18next-chained-backend plugin for missing key level fallback?
It seems by default Reacti18next falls back to the translation key if no translation was found in Remote URL which i passed using HTTPBackend loadpath for the key, e.g. // No translation defined for bill_type_blank yet i18next.t('bill_type_blank')…

sanjay
- 21
- 2
2
votes
2 answers
i18next mapping en-US locale to en namespace folder/file
Sorry if I am not asking this question correctly, currently, our system uses i18next with the i18next-http-backend and i18next-browser-languagedetector. The browser, using i18next-browser-languagedetector returns en-US when the browser is using an…

Tanner Summers
- 689
- 1
- 8
- 26
2
votes
0 answers
Webpack 5 / i18next - Module parse failed: 'import' and 'export' may appear only with 'sourceType: module'
Im unable to build and start yarn server after upgrading Webpack from version 4 to 5. One package that doesn't want to cooperate is i18next-http-backend. Im trying to compile JS and TS files at once.
Webpack configuration:
'use strict';
const ENV =…

Przemek Wit
- 135
- 3
- 12
2
votes
1 answer
Create React App - loading i18n translations from relative path
My React app loads from a relative path by setting the homepage variable in package.json. However i18next-http-backend still tries to load the translations from http://localhost:3000/locales/en/translation.json instead of…

Naresh
- 23,937
- 33
- 132
- 204
1
vote
1 answer
How to fill the value the same as key in translation.json i18next-parser
I use i18next-parser to parse my tsx code but i cannot find the proper configuration argument, i want to fill the value the same string as key is in generated translation.json. It mean that the default values must be the same the key it-self.
I…

Leila Nikonova
- 115
- 4
1
vote
0 answers
How to create shared language resources with i18next in multi-app node/express & react monorepo?
I just started to use i18next in my monorepo (new to it), which has several serverside microservices and a couple of frontends, including several custom library components. Many of the language strings are shared, and some are app specific. I could…

Bülent Özden
- 53
- 1
- 6
1
vote
1 answer
How to mock i18next-http-backend?
I have i18next-http-backend configured in my react app as follows:
import i18n from 'i18next'
import Backend from 'i18next-http-backend'
import detector from 'i18next-browser-languagedetector'
import { initReactI18next } from 'react-i18next'
i18n
…

Hermann.Gruber
- 1,257
- 1
- 12
- 37
1
vote
2 answers
i18next-http-backend is making multiple API calls
I am applying internationalisation to my app with i18Next. The translation resources are severed via REST micro service. I am using i18next-http-backend plugin to fetch the translations.
The problem is that the plugin is making multiple API calls…

Lorem Ipsum
- 337
- 2
- 14
1
vote
2 answers
react-i18next pass value into .json using translation
I followed the article here: https://dev.to/adrai/how-to-properly-internationalize-a-react-application-using-i18next-3hdb.
Now I want to know if there is a way to pass an argument into the string pulled from the .json…

Fiddle Freak
- 1,923
- 5
- 43
- 83
1
vote
1 answer
i18next backend loadPath fails to map the data
i'm trying to load the translation from the third party using i18next, react-i18next and axios.
Here is mine i18n.js:
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import LanguageDetector from…

M G
- 35
- 7
1
vote
1 answer
i18next react & express access the key without writing the lang code and the translation key
Hi i trying to supported multi lang in my app , but i must to access to the key by the response that get from express.
i am used i18n in react and express to get from the backend the translation.
like this is work for…

Guy 235
- 21
- 2
1
vote
1 answer
React i18next loading translation files both from frontend (e.g. localhost :3000) and backend (e.g. localhost:5000)
I am making one react app which fetches data from backend and displays in the browser. For changing the language for static names (like in header, footer), it is changed if I set locales folder inside public folder, and creating all the json files…

Rojan Subedi
- 25
- 1
- 7
1
vote
0 answers
i18next translation is 404 Not Found in Storybook with i18next-http-backend
I tried integrating i18next to my Storybook with i18next-http-backend and it is trying to load the translations file from http://localhost:6006/public/locales/en/translation.json but gets a 404. I have my language files inside my app/public…

Milindu Sanoj Kumarage
- 2,714
- 2
- 31
- 54