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

Auto Import local files #3301

Open
2 of 4 tasks
sbruegel opened this issue Jan 10, 2025 · 0 comments
Open
2 of 4 tasks

Auto Import local files #3301

sbruegel opened this issue Jan 10, 2025 · 0 comments

Comments

@sbruegel
Copy link

Describe the feature

May be I just haven't found the correct documentation yet. But is it somehow possible to auto import localization files? So is there any default file parameter?

So assuming you have set up the file path correct

app/
server/
i18n/
  locales/
    en.json
    ja.json
  i18n.config.ts
  localeDetector.ts
nuxt.config.ts

Is it possible to just tell in nuxt.config.ts and let auto import correct .json, .js or .ts located at i18n/locales?

i18n: {
    // ToDo when translations are available change it!
    detectBrowserLanguage: false,
    strategy: 'no_prefix',
    defaultLocale: 'en',
    lazy: true,
    locales: [
      { code: 'en', iso: 'en-US' },
      { code: 'ja', iso: 'ja-JP' }
    ],
  }

if not i would like to raise it as a feature to stay aligned with nuxt auto import design

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

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

No branches or pull requests

1 participant