-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
[BUG?]: Locale resolver scans srcDir
instead of rootDir
#2983
Comments
Just realized I can use a relative path in the config. i18n: {
langDir: '../lang',
} A point on consistency could still be made though. |
Thank you for your reporting! |
This is also an issue when using local modules with Nuxt4 directory structure, I haven't found a way around this yet tbh:
It tries to look up the module under I'd even argue that this is already broken vor v3 for people that change their |
@bernhardberger Could you open an issue with a reproduction on https://github.com/nuxt/nuxt ? 🙏 |
@Gerbuuun Let me know if you have any questions, hopefully this resolves your issue 😄 |
In Nuxt 4 the
srcDir
will beapp
by default instead of being the same as therootDir
.I want to put my
lang
directory outside of theapp
directory because I also use translations server side.In the module setup it will scan the
srcDir
for the translation files but they are located outside of it.i18n/src/module.ts
Lines 184 to 188 in cddb8b3
(The
experimental.localeDetector
, in contrast, does scan therootDir
)i18n/src/nitro.ts
Line 138 in cddb8b3
I tested the module with only changing the
nuxt.options.srcDir
tonuxt.options.rootDir
and it works fine.I hope this is the easy fix I think it is.
cc @danielroe
The text was updated successfully, but these errors were encountered: