125 questions
0
votes
0
answers
113
views
How to set up subdomain-based multi-tenancy with Next.js, Supabase (DB/Auth), and next-intl?
I’m trying to build a multi-tenant platform similar to how Sentry works, where the root domain (e.g. https://sentry.io/en) serves the marketing site, and each tenant has its own localised subdomain (e....
-1
votes
2
answers
85
views
How to enforce identical keys across multiple i18n JSON translation files in TypeScript?
I’m working on a multilingual application with the following structure:
messages/
├── en.d.json.ts // baseline type definition
├── en.json
├── ja.json
├── zh-CN.json
└── zh-TW.json
Each file has ...
0
votes
1
answer
89
views
next-intl is throwing error in Docker Image using NextJS15 But working fine on local Production and local dev
I have NextJS 15 setup and have integrated latest next-intl for localisation.
I am not using any routing for localisation, no middleware even
I am using App Router.
My setup is working fine in ...
0
votes
1
answer
115
views
How to Combine Next.js 14 Middleware with next-intl for Localization, Province Subdomain Rewrites, and CORS?
I'm working on a Next.js 14 (and I want to configure localization) project using the App Router and need to combine three middleware functionalities:
Province subdomain rewrites
Localization with ...
1
vote
1
answer
57
views
Mysterious 404 with next-intl and supabase auth
I have many mysterious 404 errors that seem to circumvent my app router integration with next-intl.
middleware /rider/trip/1321fcf9-91ef-4142-9c31-53934d1383ad
response: 200
✓ Compiled in 1ms
GET /...
1
vote
0
answers
95
views
404 Error when trying to login with Clerk in Next.js app using next-intl for internationalization
I'm building a Next.js application using Clerk for authentication and next-intl for internationalization. Everything was working fine until I tried to implement the login functionality. Now I'm ...
0
votes
0
answers
77
views
How to write middleware.ts when using next-intl for a NextJS app?
Using NextJS and React here. So the gist is that we provide our clients with their own website and subdomain (eg: salon.xyz.ai / salon2.xyz.ai). I am trying to add localization using next-intl with ...
1
vote
0
answers
29
views
How to prevent exposing all translations to the client in App Router with next-intl
I'm currently using:
[email protected]
[email protected] with the App Router
Translations structured like this:
{
"General": {
"hello": "Привет"
},
"Admin": {
"...
0
votes
1
answer
39
views
Binding element 'children' implicitly has an 'any' type.ts(7031) in Next.js / next-intl
I have recently created my first webapp with Next.js and I was using next-intl for offering multiple languages. I implemented it as described on their website which worked just fine. Also I have added ...
0
votes
0
answers
49
views
not-found.tsx can not work when I use next-intl
I had already put layout.tsx and page.tsx under the directory src/app/[locale]/, and then I put the not-found.tsx in src/app/[locale]/, when I refresh the page , I could not see my own not-found.tsx ...
0
votes
1
answer
3k
views
In HTML, <html> cannot be a child of <body>, This will cause a hydration error
I got an error when using next-intl.
this is my first time using this library. i don't know if i have setup correctly.
this is my code
import React from 'react';
import localFont from 'next/font/local'...
0
votes
0
answers
118
views
How to wrap next-intl link wrapper over Next.js link with Headless UI DataInteractive
I have a link component that simply wraps Next.js link in Headless.DataInteractive component.
import * as Headless from '@headlessui/react'
import NextLink, { type LinkProps } from 'next/link'
import ...
0
votes
1
answer
293
views
How to fix redirects in Next.js middleware?
I'm building a project using next.js and next-intl plugin for internationalization.
I want to extend next-intl locale detection logic by forcing the use of our own cookies (that were used before on ...
0
votes
0
answers
31
views
Error acessing route with next-intl after link click
I have a next.js aplication that works perfectly without any error, but after I add the next-intl to handle the i18n when I click a link that redirects me to another page, it returns an error.
error:
...
0
votes
0
answers
99
views
Combining clerk middleware with next-intl middleware
Newbie Next dev here. How do I combine these in src/middleware.ts?
import createMiddleware from 'next-intl/middleware';
import {routing} from './i18n/routing';
export default createMiddleware(...
4
votes
0
answers
295
views
How do I enable static generation when using [locale] and next-intl with nextjs 15
I've been trying to get SSG to work properly with NextJs 15 and next-intl for localization as my site has 2 locales: en and es
I tried the following:
import { routing } from '@/i18n/routing';
...
0
votes
0
answers
152
views
Can not get "referer" header on NextJS middleware when deployed to Vercel
I am using next-intl package to make internalization on my Next app. In the server side I need to get the URL so I can look to param and make a request to my backend with it. Using referer header ...
0
votes
1
answer
245
views
How to hide default locale in NextJS 15 using next-intl?
I want to hide the default locale in NextJS, i.e by default domain.com should work. But if user lands on domain.com/en, this should also work.
My folder structure:
src/app/[locale]/...
src/app/blog/[...
0
votes
1
answer
389
views
NextJS static rendering does not work when working with next-int
According to next-intel documentation, we can use setRequestLocale to enable static rendering, but it's not working. I'm trying to apply static rendering to all pages under [locale] path, but when I ...
0
votes
0
answers
51
views
Next.js + internationalisation - static website
I have a statically generated Next.js project (it's also a requirement that it remains static), which uses next-intl for localisation.
I want to improve SEO, so ideally I need dynamic Metadata. Since ...
0
votes
1
answer
238
views
Integrate next-intl provided middleware with pre-existing middleware
I have an existing middleware that handles the auth.
Now i am trying to add the next-intl to my project. However i am having a hard time combining both of them.
I followed their tutorial and ...
0
votes
0
answers
45
views
Next-intl invalid locale guard not working as app/[locale]/[[...slug]]/page.tsx & child components executes before app/[locale]/layout.tsx
If you follow next-intl documentation you basically set a "guard" in app/[locale]/layout.tsx
if (!locale || !locales.includes(locale)) {
notFound()
}
So I'd expect it to end there and ...
1
vote
0
answers
253
views
Nextjs15 next-intl always forcing me to open website with /en prefix if middleware has "en" in locales, but i set defaultLocale "az"
These are my routing.js and middleware.js files. If i add locales array for example "fr" instead of "en" its opening website "az" (default prefix). Btw im using nextjs 15 ...
1
vote
1
answer
2k
views
How to Suppress MISSING_MESSAGE Errors in next-intl in Next.js App?
I'm developing a Next.js app using the next-intl package for locale handling, and I am loading the locale messages from an external server. Most of the messages do not exist in my local development ...
0
votes
2
answers
951
views
Hydration Error and Locale Headers Issue with Next.js 15 and Next-Intl
I'm working on a Next.js 15 project that utilizes the next-intl library for internationalization. I’m encountering two primary issues:
Hydration Error
I’m receiving a hydration error that states:
...
1
vote
1
answer
231
views
next-intl routing.ts giving TS2554: Expected 0 arguments, but got 1
Keep getting "TS2554: Expected 0 arguments, but got 1" when using next-intl with NextJS 14 and TypeScript 5. I'm following the example in the docs and can't seem to get rid of this ...
1
vote
1
answer
200
views
NextJS + next-intl middleware fetch
if the ip address of the user entering the site is blocked, I want to redirect to a different page such as /blocked and not access the site. I wanted to create a fetch request on my middleware and run ...
0
votes
1
answer
182
views
How to chain kinde authentication check middleware and next-intl middleware in nextJS 14 using App Router
I'm working on a Next.js 14 App Router project where I need to integrate two middlewares:
Kinde authentication middleware (for protected routes like /dashboard).
next-intl middleware (for ...
0
votes
1
answer
754
views
next-intl getMessageFallback in Client Component throws "Functions cannot be passed directly" error
I'm using next-intl in my Next.js 14 app to handle localization.
I want to implement a fallback method for missing translations, so that if a translation like AssetDescriptions.NOT_EXISTS_TEST is not ...
3
votes
1
answer
2k
views
Next-intl: Error: INVALID_MESSAGE: MALFORMED_ARGUMENT (Show details for {{type}})
I'm working on a NextJS (Typescript) project with Next-intl.
I have strings in JSON file and everything works well, unless I use arguments.
I use it in 'use client'; component:
import { ...
1
vote
0
answers
97
views
Usage of next-intl APIs in Server Components currently opts into dynamic rendering during build in not-found page
Description
When I run yarn build, I get this error:
Error: Usage of next-intl APIs in Server Components currently opts into dynamic rendering.
This limitation will eventually be lifted, but as a ...
0
votes
1
answer
386
views
Language Selector component to re-route to correct Language page in NextJS with next-intl
I am struggling to get the re-routing right for language selection in my NextJS project. At the moment I have two languages EN (default) and PT.
The current behavior for the dev environment is:
...
0
votes
0
answers
1k
views
Next.js Error: Failed to Determine Locale in NextIntlClientProvider, Please Provide the locale Prop Explicitly
First time asking a question here, sorry if i did not provide some needed info. I am working on a Next.js project and trying to implement internationalization using the next-intl package in a Client ...
3
votes
0
answers
382
views
Next-Intl: How to know the localized pathname in middleware.ts - NextJS
I'm using NextJS 14 and next-intl.
I'm implementing localized pathnames (https://next-intl-docs.vercel.app/docs/routing#pathnames)
In my NextJS Middleware, I'm checking if I'm in a route like:
request....
0
votes
1
answer
224
views
Custom Routes in NextJS to support countries and languages
My site paths are like -
https://www.example.com/us/en/products
https://www.example.com/us/es/products
https://www.example.com/us/en/categories
https://www.example.com/us/es/categories
or -
https://...
0
votes
1
answer
523
views
Next.js with next-intl: 500 Internal Server Error on Root Page in Production Build (TypeError: Cannot read properties of undefined)
I've integrated next-intl with the App Router in my Next.js project, including setting up i18n routing. Everything works flawlessly in development mode, but when I build the project for production and ...
-2
votes
1
answer
248
views
Next.js Multi-language Support
I'm developing a Next.js project for the first time. The site will support 6 languages. English, Italian, Russian, Turkish, Greek, Serbian, and Arabic. What I need to do is the following.
I want to ...
0
votes
1
answer
2k
views
How to change the language without refreshing the page using next-intl client component
I want to change the language without refreshing the page by change cookie in next.js using next-intl without i18n routing, and in client component。this is my code https://github.com/lik3yoo/next-app/...
0
votes
1
answer
12
views
Local changes uncontrollably when the page changes
I am using "next-intl": "^3.17.2" in my project. There is no problem with my language change switch. However, when I change the page by clicking on the links in the Navbar, the ...
1
vote
0
answers
56
views
Next-intl middleware occurs Next-auth Dynamic evaluation error
I have Next.JS 14.2.3 project which contains next-auth.js and next-intl with versions:
Whose versions are latest as for now (next-intl 3.17.2 latest).
Problem
While building the project from time to ...
1
vote
1
answer
969
views
Error: Usage of next-intl APIs in Server Components currently opts into dynamic rendering
I'm building a website with Nextjs (14.2.3) and next-intl ("^3.14.1"), encountering buildtime error:
Error: Usage of next-intl APIs in Server Components currently opts into dynamic ...
0
votes
1
answer
295
views
Next-intl reports an error when accessing a SSG subpage without {locale}
I'm using nextjs 14+, app router, next-intl, and it's statically exported
This is the file structure:
src/app/[locale]/page.tsx
src/app/[locale]/about/page.tsx
When I visit http://localhost:3000/, ...
1
vote
2
answers
2k
views
Next.js - localization next-intl - remove default language from url
I'm sharing my middleware.ts and i18n.ts.
Its my first time with localization in next.js, I made it work, but now I'm struggling with URL, because I do not wish to have "cs" in default ...
2
votes
2
answers
467
views
Error: Insufficient params provided for localized pathname (getPathname()). Since I added "next-intl/routing"
Since I added the config file and replace :
Navigation File
import { createLocalizedPathnamesNavigation, Pathnames } from 'next-intl/navigation';
By :
Config File
import {Pathnames, LocalePrefix} ...
1
vote
1
answer
93
views
Nextjs, Typescript: Property 'menu1' does not exist on type 'string | AbstractIntlMessages'. Property 'menu1' does not exist on type 'string'
I use Nextjs, typescript and next-intl.
in my layout.tsx i have following code:
import {NextIntlClientProvider} from 'next-intl';
import {getMessages} from 'next-intl/server';
export default async ...
0
votes
1
answer
46
views
Build error from node_module package next_intl
Using next and next_intl for localization, I faced this problem while running the build command.
pnpm run build
> next build
▲ Next.js 14.2.5
- Environments: .env
Creating an optimized ...
-1
votes
2
answers
556
views
Combining Next-Intl and Supabase Middleware in Next JS Router
I have a NExt JS project using the app router with Supabase.
I have a ROOT middleware.js file that contains some supabase code. I also need to integrate Next-Intl middleware into this too and i'm not ...
1
vote
2
answers
348
views
Nextjs with next-intl renders the page twice
I am using nextjs 14 and just integrated next-intl for internationalization.
My Problem:
If I switch between the browse and my-items page, the fetch script, and the page rendering twice
My questions:
...
2
votes
1
answer
2k
views
Next-intl gets the specified array object
My message/en.json looks like this
{
"items": [{
"name: "item 1",
"price: "100",
}, {
"name: "item 2",
"price: "200&...
2
votes
3
answers
4k
views
Unhandled Runtime Error Error: Expected a suspended thenable. This is a bug in React. Please file an issue
I am implementing next-intel to provide translations for French and Arabic audiences, currently I have come to the theme provider and locale selector configuration which worked great without any ...