Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

How can i remove wrapping locale object? #101

Open
illjah42 opened this issue Nov 27, 2019 · 1 comment
Open

How can i remove wrapping locale object? #101

illjah42 opened this issue Nov 27, 2019 · 1 comment

Comments

@illjah42
Copy link

In our work we use lazy-loading translations, provided by https://nuxt-community.github.io/nuxt-i18n/.

Loaded file expects to be like this:

{
   key: 'value'
}

But the generator outputs something like this, even for --multi-locales flag:

{
  en: {
    key: 'value'
  }
}

The loaded file injects as is, so the translation function can't find $t('key'), because now it is $t(i18n.locale + '.key')

Can we somehow tune the generator to recieve an object, not wrapped in locale key in output?

@yevhenlisovenko
Copy link

The same issue! Looking forward!

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

No branches or pull requests

2 participants