Questions tagged [i18next-http-backend]

42 questions
1
vote
2 answers

I am getting this error: Attempted import error: 'initReactI18next' is not exported from 'react-i18next'. This is what my i18next.js file looks like

This is my i18next.js file. I have downloaded all the dependencies and I was wondering why I am getting this error: Attempted import error: 'initReactI18next' is not exported from 'react-i18next'. import i18n from 'i18next'; import {…
1
vote
3 answers

Spartacus Storefront Multisite I18n with Backend

We've run into some problems for our MultiSite Spartacus setup when doing I18n. We'd like to have different translations for each site, so we put these on an API that can give back the messages dependent on the baseSite, eg:…
0
votes
1 answer

how to use i18next in sailsjs

we are using handlebar to render the view and now must use i18next lib to render the translated pages in our sailsjs backend but i could not find any example on how to integrate i18next in sailsjs and use it in my template. i am aware that there is…
MAK
  • 163
  • 2
  • 11
0
votes
0 answers

Custom request with i18next-http-backend

I am likely missing some simple solution, but I would like to know how one would send a custom request using i18next-http-backend with a url that cannot be defined by the loadPath option. I had though it would be easily done via the request…
seMikel
  • 246
  • 2
  • 14
0
votes
1 answer

i18next Server side translations won't re-fetch the translation changes and update the page when using ISR in NextJS

I want to load the translation from the backend in the nextjs frontend page. Here is the next-i18next config file, correct me if I am wrong. const I18NextHttpBackend = require("i18next-http-backend/cjs"); const path = require("path"); module.exports…
0
votes
0 answers

Using i18next-chained-backend to load resources from api and using local data as fallback.But translation key is shown in the application not value

Using i18next-chained-backend to load resources from backend and using local data as fallback. But before api respond, translation key is shown in the application. import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import…
0
votes
0 answers

initialI18nStore is empty when i18next-http-backend is used

I am using next-i18next with i18next-chained-backend for i18next-fs-backend & i18next-http-backend in a Next.js app, where i18next-fs-backend is used as server-side cache. It seems like there is an issue with the updation of cache, from my…
0
votes
0 answers

Disable i18next falling back to "parent" key when missing translation

I'm working on a project that uses i18next, react-i18next and i18next-http-backend. There are two namespaces: common which are translations stored in the app, and db, which is fetched from backend. The init looks like this: i18n …
0
votes
0 answers

How to set dynamic custom header in i18next-http-backend plugin?

i18next-http-backend - Docs I have the following configuration for i18next in react application. My problem is to set dynamic values in header, such as: "accept-lang". According to documentation customHeaders provided for this, but it has no any…
coder21
  • 1
  • 1
  • 4
0
votes
0 answers

Add i18next to a ReactJS project with dvajs

I have a ReactJS project which uses dva (https://github.com/dvajs/dva, https://dvajs.com/API.html). I'm trying to add i18next to the project by following this youtube video. But it seems that i18next fails to be plugged into the project. As a…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
0
votes
1 answer

i18next-http-backend not working on production

I am using i18next for transalation with i18next-http-backend to get the translation files. My codes works on development but not on production, it's a vite application. i have tried a couple of suggestion by using different i18next-http-backend…
sandy
  • 67
  • 1
  • 4
0
votes
0 answers

How to properly use ChainedBackend with i18next when managing server side translations with local fallback

I am working in a React Native application and managing our translations using i18next, though I am having some difficulty with the following scenario... What I wish to do is, when the app loads up and i18next is initialised to attempt to load the…
Simon
  • 2,065
  • 3
  • 21
  • 28
0
votes
0 answers

How can we use react query in i18next configuration

I'm using i18next library to implement localisation in my react app, where I've to call an API to get the localisation in a response. But I want to use react query to call an API, and I know that react query being a hook can only be called in…
0
votes
1 answer

Can I put the locales folder containing JSON files for each language in a custom directory outside public folder while using react-i18next? How to do?

Can I put the locales folder containing JSON files for each language in a custom directory outside public folder while using react-i18next? How to configure the same? I am also using lazy loading and caching. Things work when the locales folder is…
0
votes
2 answers

The next-i18next don't bring the data from an endpoint

In a Nextjs project using next-i18next, I'm trying to read language json file from a cms but my configuration is not working. This is my 'next-i18next.config.js': const I18NextHttpBackend = require('i18next-http-backend/cjs'); module.exports =…