react-i18next: i18next::backendConnector: loading namespace translation for language es failed
🐛 Bug Report
I’m getting this error, even though the file exists and is accessible as an absolute url too:
i18next::backendConnector: loading namespace translation for language en failed Error: ENOENT: no such file or directory, open ‘/locales/en/translation.json’
I’m using astro-i18next with Astro.
My initial config:
export default {
defaultLocale: "en",
locales: ["en", "es"],
i18nextServer: {
debug: true,
backend: {
ns: ['translation'],
loadPath: '/locales/{{lng}}/{{ns}}.json',
},
},
};
Project structure:
- public
-
- locales
-
-
- en
-
-
-
-
- translation.json
-
-
-
-
- es
-
-
-
-
- translation.json
-
-
-
- src
-
-
- React-based Astro components here
-
- astro-i18next.config.js
- astro.config.mjs
- package.json
- tsconfig.json
My Environment
- runtime version: node v18.13.0
- i18next version: astroi18 v1.0.0-beta.17
- os: Mac
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23 (14 by maintainers)
you’re welcome… but next time please open the issue in the correct repo… This issue was not really related to react-i18next…
If you like i18next don’t forget to star it. Make a tweet, share the word or have a look at our https://locize.com to support the devs of this project.
There are many ways to help this project 🙏