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

How to make intlify read from 2 different directories? #100

Open
Aravinda93 opened this issue Aug 28, 2023 · 0 comments
Open

How to make intlify read from 2 different directories? #100

Aravinda93 opened this issue Aug 28, 2023 · 0 comments

Comments

@Aravinda93
Copy link

I have a Nuxt 3 or Nuxt.js application with the following folder structure:

📦root
 ┣ 📂commons
 ┗ 📂project1
 ┗ 📂project2

I have a page in project1 from which I can navigate to a page in project2. While navigating from project1 to project2 the page contents from project2/locales are not loaded. All the contents and components from project2 are loading fine but the words and button text do not appear as it is unable to read locales content.

Even If I add the reference to it it's not working fine and still displays the respective variable name instead of the value mentioned in locales/en.

project1/nuxt.config.js

  intlify: [
    {
      localeDir: "locales",
      vueI18n: {
        locale: "en",
      },
    },
    {
      localeDir: "../project2/locales",
      vueI18n: {
        locale: "en",
      },
    },
  ],

Project1 locales work fine but project2/locales are not loaded. However, when I run a project2 independently everything works fine. but when I am trying to access project2 from project1 I get the error and locales are not loaded.

Can someone please let me know how can I make the @intlify/nuxt3 to read from 2 different folders and achieve this?

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

No branches or pull requests

1 participant