Questions tagged [next-i18next]

165 questions
0
votes
0 answers

i18next nesting with Ant Design Form validation

it's been 3 hours since I started trying to get a nested translation and I'm stuck. I have this structure in common.json "forms": { "fields": { "rea_number": "", "ateco_number": "", "commercial_register_number": "", ... …
Oscopoldo
  • 51
  • 4
0
votes
0 answers

can i use ts/js file as next-i18next locale resource file?

i try to use next-i18next in my new next project. and it can use json as the default localeExtension, yes, it work well. but when i try to change it js. the t not working. somebody can tell me, if i can use js or ts file as locale file's…
GeminiYellow
  • 1,016
  • 2
  • 12
  • 34
0
votes
0 answers

Problem using Trans Component with two or more links in text i18next

I'm pretty stuck. I am trying to insert a text that contains two links with the Trans component. I'm using a function instead of a class, because I can't figure out how to use the hook in a class. The codeI am trying is:
0
votes
0 answers

appWithTranslation causing connection errors

I am adding the next-i18next library to my app. It uses WebSockets. After wrapping the app with appWithTranslation(MyApp) it suddenly refuses all connections. This doesn't make any sense to me. I cannot find a reason for this in any of the…
Jkaram
  • 611
  • 2
  • 7
  • 13
0
votes
0 answers

Nextjs i18next can I serve or point to a different file when sub-path locale changes in URL?

In NextJS's routing system, if I navigate to //mysite.com/about/ it serves my project file pages/about.js But when using i18n to add mysite.com/fr/, it still serves pages/about.js, not pages/fr/about.js. This is fine in most cases because you want…
0
votes
0 answers

minimizing the need for localization files next-i18next

we need to support 4 languages in our application. you can see our locales list here: locales: [ 'en-us', 'en-es', 'en-de', 'en-mx', 'en-co', 'es-es', 'es-de', 'es-mx', 'es-co', 'de-es', …
oakar
  • 1,187
  • 2
  • 7
  • 21
0
votes
1 answer

next-i18next : get the value of locale to change page dir to right to left

I just migrated to next.js and started using next-i18next instead of React i18n. my objective is to change the html page dir to right to left when choosing the Arabic language. I was using a cookie to achieve this but I belive if I can get the value…
Moammer
  • 139
  • 1
  • 2
  • 11
0
votes
1 answer

next-i18next fail to load locales from public folder

I migrated to next.js and started to use next-i18next. I would like to know, how to make next-i18next load locales from the public folder? It works only when I place the locales folder in the root directory not in public. i18n.json ; { …
Moammer
  • 139
  • 1
  • 2
  • 11
0
votes
1 answer

Trying to use translation key from a CMS with next-i18next but got ._nextI18Next.userConfig.use[0]` returned from `getServerSideProps` in "/"

It's been some days I'm trying to fix this problem but without success... I'm trying tu use next-i18next to get some translations keys coming from a CMS. We are in SSR, that why I use getServersSideProps. But got the…
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 =…
0
votes
1 answer

Internationalisation in NextJS

I am trying to put together a NextJS project that needs i18n. I found multiple libraries regarding i18n. Do we really need to those ? Though I went through documentations, maintaining an Object at global level and retrieving it based on locale info…
0
votes
0 answers

How to use next-i18next with Redux Persist in NodeJS?

I have error when combine appWithTranslation and PersistGate: Unhandled Runtime Error NotFoundError: The object can not be found here. My code: import { appWithTranslation } from 'next-i18next' import { Provider } from 'react-redux' import {…
0
votes
1 answer

Axios Post request while using nextJS routing and next-i18next not to use language routing

I am having trouble with my axios post request: I am using https://www.npmjs.com/package/next-i18next and it prepends the language url to the api when sending a post request -- however I do not wish this behaviour My axios request : const { data }…
karentut
  • 23
  • 7
0
votes
1 answer

Why isn't my t() texts refreshing in localhost/en but refreshing in localhost/fr on i18n.changeLanguage()?

Hi I just made a website with a darkmode and multilanguage support to test around but I ran into an issue. the code I got rid of all things that aren't an issue portfolio/src/pages/index.tsx import { useTranslation } from 'react-i18next' import {…
Tristan
  • 112
  • 1
  • 12
0
votes
1 answer

How to load config from API - Next.js i18n?

I would like to add to my next.js app the ability to change (add / remove) language versions and translate texts from API. At the moment I'm using next-i18next. I keep the translation files in /public/locales, and in the config I have 2 language…
Ashma
  • 66
  • 3