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

Support yaml for addResourceBundle #227

Open
libasoles opened this issue Oct 16, 2018 · 1 comment
Open

Support yaml for addResourceBundle #227

libasoles opened this issue Oct 16, 2018 · 1 comment

Comments

@libasoles
Copy link

I'm using yaml on init method, like this:

backend: {
      loadPath: path.join(__dirname, '/../locales/{{lng}}/{{ns}}.yml'),
    },

Afterwards, I want to load more resources, but addResourceBundle doesn't recognize yaml format. It doesn't fail, it just wont's load the needed translations.

@jamuhl
Copy link
Member

jamuhl commented Oct 16, 2018

addResourceBundle will add a json object

just call loadNamespaces to load additional ns: https://www.i18next.com/overview/api#loadnamespaces

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