Questions tagged [next-i18next]

165 questions
1
vote
1 answer

How to get the locale value from URL in Next Js

In Next Js application, I am using next-i18next module for multi language support. It is working fine. Code of NabBar component: const NavBar = ({...props}) => { const router = useRouter() const { t } = useTranslation('navbar'); const…
Deep Kakkar
  • 5,831
  • 4
  • 39
  • 75
1
vote
2 answers

I get a 404 page in vercel after adding next-i18next

I have added the app next-i18next for internationalisation. After that, all pages in vercel become 404 pages. By the way, it works perfectly in locally. WHY?? const { i18n } = require("./next-i18next.config"); module.exports = { i18n: { …
Ryosuke Hujisawa
  • 2,682
  • 1
  • 17
  • 18
1
vote
1 answer

NextJS locale change with dynamic routes

Locale change works well in my next.js app, except for with dynamic routes. In the browser address bar I do get the transition from http://localhost:3000/client/home/profile to http://localhost:3000/de/client/home/profile, but the page gives a 404…
artooras
  • 6,315
  • 9
  • 45
  • 78
1
vote
1 answer

Next Js dynamic i18n subfolder

I am currently working with a headless WordPress site in Next.js. I struggle a bit with the routing for internationalization. I have 2 main page files relevant for this question: pages/[...slug].tsx In this file I use a getStaticPaths function to…
Lars Ejaas
  • 153
  • 9
1
vote
1 answer

NextJs apps with next-i18next TypeError: NextI18Next is not a constructor

I'm building a multiple language website with next.JS and the package next-i18next. I am moving project from i18next to next-i18next ready - started server on 0.0.0.0:3000, url: http://localhost:3000 Still receiving the following error, can anyone…
1
vote
1 answer

Error on next-18next integration with latest nextjs: appWithTranslation was called without a next-i18next config

I am upgrading today app to latest nextjs version (10.0.9). In order to move translates I used next-i18next lib and its simple example from Github. However, in my app I always get next error: On debugger of next-i18next lib, I found that this error…
AlexBerd
  • 1,368
  • 2
  • 18
  • 39
1
vote
0 answers

Next production bundle in Cypress does not locate static files

I am using next-i18next for my translation. Inside the /public dir are my translation *.json files. "next": "^10.0.2", "next-i18next": "^8.1.1", My Cypress tests fail when running my production bundle, because the full text string is not…
Phil Lucks
  • 2,704
  • 6
  • 31
  • 57
1
vote
1 answer

Why next-i18next is always routing to EN in Safari?

next-i18next works but not on Safari. I even set regional localizations in our Next.js app, because Safari usually does not pass hu but hu-hu. I would not create a separate translation json for regional differences. So both hu and hu-hu should use…
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
2 answers

Next.js next-i18next is always routing to EN

I have a simple project that supposed to work with English and Dutch(default). I have copied everything from the original example but somehow it doesn't work as expected. Even though I have browserLanguageDetection: false, it is forcing me to…
1
vote
0 answers

How to set up test environment next.js project using next-18next ? when Link of next-18next is imported in a component test are failing

set up of next-i18next in -- i18n.ts const { localeSubpaths } = require('next/config').default().publicRuntimeConfig const path = require('path') const NextI18NextInstance = new NextI18Next({ defaultLanguage: 'en', browserLanguageDetection:…
1
vote
2 answers

Determining the language by the path of Url

I tried to find a way to change the language by changing the site's sub-path in the next-i18next package, I searched the Internet (https://github.com/isaachinman/next-i18next/issues/32 ,…
1
vote
0 answers

next.js multiple configurations on next.config.js

i'm having issues with my next.js config file when trying to configure the next-i18next package (version 6) and also have a webpack config for audio, and a plugin for images. until the upgrade everything was fine, but now is not loading the…
andrei
  • 19
  • 5
1
vote
1 answer

how to change with next-i18next when language changed in nextjs?

I'm using next-i18next for multi language website and for all components works well but I dont know how to change the language of html tag in _document.js file?
Reza Ghorbani
  • 537
  • 4
  • 14
1
vote
1 answer

next-i18next has bug Apostrophe is displayed as '

I am using next-i18next. I have a bug has bug Apostrophe is displayed as ' How I can fix it?
Noa
  • 424
  • 1
  • 3
  • 16
1
vote
1 answer

Parametrized dynamic imports with next.js

I'm trying to integrate formatters generated with globalize npm package into next.js based application. Formatters are stored in locale specific files. Idea is to import locale specific formatters dynamically based on current locale. Current locale…