gatsby-plugin-react-i18next
gatsby-plugin-react-i18next copied to clipboard
Source filesystem not creating allLocale
Hello!
In the documentation, it says to add the graphql inside the page, to get the translation for namespaces.
query($language: String!) {
locales: allLocale(
filter: {ns: {in: ["translation", "about-page"]}, language: {eq: $language}}
) {
edges {
node {
ns
data
language
}
}
}
}
Except that when i look inside graphiql i see:
enJson ruJson
not the allLocale i was expecting.
This is the filesystem in the config:
{
resolve: `gatsby-source-filesystem`,
options: {
name: `locale`,
path: `${__dirname}/locales`,
}
},
and the folder structure is:
/locales/en
- common.json
- about-us.json
/locales/ru
- common.json
- about-us.json
Fixed it by updating plugin to 1.0.1, it was 0.2 :) .