Assistance Needed with Implementing Localization in Next.js with Payload CMS 3.0 #9435
Unanswered
brianFrizzera
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, Friends!
I'm developing a web application using Payload CMS 3.0, incorporating the website template for a portion of the app. My goal is to implement localization by structuring my URLs to include locale codes, such as:
https://domain.com/pt/posts/teste
https://domain.com/en/home
While attempting to set up dynamic routing with
[locale]/[slug]
, I've encountered issues where only the default locale works, and only for the home page (e.g.,https://domain.com/pt
orhttps://domain.com/pt/home
). Although implementing localization solely in Next.js is straightforward, I'm unsure about the best practices for integrating localization within Payload CMS and have tried modifying the existing code accordingly.Problem
I'm encountering routing conflicts when setting up
[locale]/[slug]
paths. Specifically:Beta Was this translation helpful? Give feedback.
All reactions