Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content and i18n - Document not found for non-default locales #2901

Closed
vlamic opened this issue Apr 5, 2024 · 2 comments
Closed

Content and i18n - Document not found for non-default locales #2901

vlamic opened this issue Apr 5, 2024 · 2 comments
Labels

Comments

@vlamic
Copy link

vlamic commented Apr 5, 2024

Environment


  • Operating System: Darwin
  • Node Version: v20.11.1
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.2.4
  • Builder: -
  • User Config: devtools, typescript, app, modules, site, nitro, content, i18n
  • Runtime Modules: @nuxt/content@2.12.1, @nuxtjs/i18n@8.3.0
  • Build Modules: -

Reproduction

Hi,

I'm trying to setup a project which is driven by content and supports multiple languages, so I have created two dirs in my content folder: en and es. When I try to access the default routes (e.g. http://localhost:3000/ or http://localhost:3000/about), it loads the pages correctly. However, when I try to access non-default pages, it's not able to locate the content (e.g. http://localhost:3000/en/about or http://localhost:3000/en). Am I missing something?

I have uploaded a sample project here: https://github.com/vlamic/content-app-test

Content structure:

iScreen Shoter - Code - 240325120127

Pages structure:

iScreen Shoter - Code - 240325120213

Nuxt config:

iScreen Shoter - Code - 240325120230

Thank you!

Describe the bug

It's not able to find the localized pages in the content folder.

Additional context

No response

Logs

No response

@kazupon
Copy link
Collaborator

kazupon commented Apr 12, 2024

Thank you for your reporting!

I tried to disable nuxt-i18n module and reproduced this issue.
So I faced same issue.
I think this issue is nuxt content.

Please, check nuxt content docs agian.
https://content.nuxt.com/

Thanks!

@owocc
Copy link

owocc commented Apr 14, 2024

I also encountered the same problem as you, and then I cloned your project, and then I deleted the i18n configuration of the content, and then I visited the page, and the page can be accessed normally.

Screenshot 2024-04-14 at 16 02 25 Screenshot 2024-04-14 at 16 03 26 Screenshot 2024-04-14 at 16 03 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants