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

language is not detected if it's a part of a path instead of the filename #184

Open
existe-deja opened this issue Oct 12, 2022 · 1 comment

Comments

@existe-deja
Copy link

It's not a top priority issue.

My files are organized following this pattern: i18n/locale/{localeCode}/main.json
If I run an analyse, the value of language is main as I assume you're showing the filename.

@ColiZei
Copy link

ColiZei commented Jul 4, 2024

Any progress?
I need this to.

I have a structure like this:

  • src/locales/{localeCode}/general.json
  • src/locales/{localeCode}/email.json

In the vue files it's used like this:

  • $t('general.user.email)
  • $t('email.newProduct.title)

the messages are merge together for i18n like this:

import enGeneral from "@/locales/en/general.json";
import enEmail from "@/locales/en/email.json";

const messages = {
  en: {
    general: { ...enGeneral },
    email: { ...enEmail },
  },
  // ...
}

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

2 participants