amannn / next-intl

🌐 Internationalization (i18n) for Next.js
https://next-intl-docs.vercel.app
MIT License
2.65k stars 237 forks source link

custom folder structure #650

Closed vaishnavi-jadhav-amla closed 8 months ago

vaishnavi-jadhav-amla commented 1 year ago

Description

Need to use localization for a custom path. I am working on a multi-tenant application using pathname as domainName/customfolder/{locale}/product/id. Currently, if we use nextintl middleware this does not work and leads to a page not found issue as middleware tries to bind the locale just after the domain name.

I have attached the screenshot for reference

image

Mandatory reproduction URL (CodeSandbox or GitHub repository)

NA

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Click on …
  3. See error: …

Expected behaviour

it should redirect along with custom folders

upardhi commented 1 year ago

@amannn : Experiencing a similar challenge here. Could you kindly provide a solution or suggest any viable alternatives?

Our focus is on developing a multi-tenant application.

amannn commented 1 year ago

I agree there's a piece missing here currently. I've opened https://github.com/amannn/next-intl/issues/653 to collect this issue together with similar ones, also to share solutions that can be used today.

amannn commented 8 months ago

I'll close this now in favor of #653. This issue is mentioned there and will be taken care of.