Questions tagged [next-i18next]
165 questions
1
vote
0 answers
Share common locales between pages
So in next-i18next it is common to load locales like this:
export async function getServerSideProps ({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, ['home', 'footer', 'header']))
}
}
}
So what I was…

suben
- 43
- 4
1
vote
0 answers
Next.js I18n - redirect
In next.js i18n redirect only works from main page "/"
If cookie NEXT_LOCALE is set to "fr" it will redirect from "/" to "/fr" but it won't redirect from "/about" to "/fr/about"
const router = useRouter();
const { pathname, asPath, query } =…

taske213123
- 11
- 1
1
vote
0 answers
Error deploy serverless nextjs on aws with component next-i18next
When I tried to deploy my NextJS app to AWS with serverless framework.
In my next JS app directory, I ran the command npx serverless
and got the following error -
npx serverless
error:
Error: Command failed with exit code 1:…
1
vote
0 answers
next-i18next detect locale with querystring
This is my next-i18next.config.js.
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['ko', 'en', 'ja', 'zh'],
},
detection: {
order: ['querystring', 'cookie', 'localStorage'],
lookupQuerystring: 'lng',
},
};
I want…

devohda
- 11
- 2
1
vote
1 answer
Hiding locales using next-i18next
Environment
I am making a website with some administration/hidden for regular user functionality. The application has internationalization. Main stack:
Next
next-i18next
NX
Packages
{
"name": "client",
"version": "1.0.0",
"license": "MIT",
…

Ev1ch
- 11
- 3
1
vote
0 answers
Using tolgee with next-i18next
I have created Next.js app which uses next-18next library for managing translations in app. Now I wanted to connect it to tolgee platform so that I can leverage its in-context editing feature. I read the docuentation and it only shows how to…

Alex T
- 3,529
- 12
- 56
- 105
1
vote
0 answers
Nextjs + Next-i18next: change of language always reloads page
I am trying to implement localization with next-i18next on the website(single page), everything works as it should be except when I change the language through the nextjs router, the page always reloads and returns to the top of the page (obviously…

KarlZ
- 33
- 5
1
vote
0 answers
How to deploy an nextjs on cpanel the app uses (i18next for internationalization)?
I'm trying to deploy an app build with nextjs on cpanel file manager,I'm using next export command so that I can take the index.html file and put it in the file manager directory on cpanel dashboard, but when I run that command (next export) I got…

Abdelrhman Gad
- 195
- 2
- 11
1
vote
0 answers
Component cannot be used a JSX component. > _app.tsx
I'm working with nextjs(TS) and next-i18next but when I install next-i18next my _app.tsx announces the error Component cannot be used a JSX component.

Leandro Cruz
- 29
- 3
1
vote
0 answers
Change language with next-i18next library without change the locale in the router
I have a "problem". I want to implement the i18n in my Next.js web app, using this library next-i18next. It is working if I change the route with the correct locale, like so localhost:3000/en --> localhost:3000/it, however the result tha I would…

Michele Dilernia
- 11
- 1
1
vote
1 answer
next-i18next t(...).map is not a function
I just migrate my working app from react to nextjs.
I followed the tutorial provided by next and installed next-i18next but I'm not being able to map
I got this kind of object
"skills": {
"title": "Skills",
"items": [
{
…

ValenciaHQ
- 381
- 1
- 13
1
vote
1 answer
next-i18next isn't working properly with Next Auth + Apollo
I recently joined a new project and I have to implement i18n.
Frontend stack : NextJS (with Next Auth) + Apollo + next-i18next
I followed next-i18next starter to implement translations. Everything worked fine until I add the addWithTranslation part,…

Pizzakath
- 11
- 1
1
vote
0 answers
How to combine next-i18next into an existing getServerSideProps function in NextJS
I have a Next page that uses next-i18next in a getServerSideProps and I have another page that uses getServerSideProps to pull data from MongoDB. Both work correctly.
I would like to be able to add next-i18next to the function that connects to Mongo…

Ray Purchase
- 681
- 1
- 11
- 37
1
vote
0 answers
set redirects and rewrites but router missed custom subpath
next.config.js
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en', 'ko', 'ar'],
},
async redirects() {
return [{
source: '/ko',
destination: '/myCustomKo',
permanent: true,
locale: false,
…

kyun
- 9,710
- 9
- 31
- 66
1
vote
1 answer
NextJS cannot disable redirect on domain
I have the following next-i18next.config.js file
module.exports = {
i18n: {
locales: ["en", "de-DE", "fr"],
defaultLocale: "en",
localeDetection: false,
domains: [
{
domain: "my-domain.com",
defaultLocale:…

user3009752
- 164
- 2
- 9
- 24