-
Notifications
You must be signed in to change notification settings - Fork 35
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
Integration requires to have localization files in public
directory
#64
Comments
The path is already configurable, you can overwrite the default config for the server i18next instance. To do so, you can set the /** @type {import('astro-i18next').AstroI18nextConfig} */
export default {
defaultLocale: "en",
locales: ["en", "fr"],
i18nextServer: {
backend: {
loadPath: "./your/path/to/public/locales/{{lng}}/{{ns}}.json"
}
}
};
I think it is possible. I'll keep this open to do it. |
Thanks, your hint works - and would suffice my use case :-) |
# [1.0.0-beta.14](v1.0.0-beta.13...v1.0.0-beta.14) (2022-11-27) ### Bug Fixes * expect locales folder to be in astro's publicDir config by default ([ec72ff3](ec72ff3)), closes [#64](#64) * import localizeUrl in HeadHrefLangs from index for access to astro-i18next runtime config ([5e3b96c](5e3b96c)), closes [#65](#65) * **trans component:** import utility functions from index ([eea0d5d](eea0d5d)) ### Features * **plugins:** set i18next plugins config for both server and client side setups ([5ddb1c7](5ddb1c7)), closes [#68](#68)
🎉 This issue has been resolved in version 1.0.0-beta.14 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [1.0.0-beta.14](yassinedoghri/astro-i18next@v1.0.0-beta.13...v1.0.0-beta.14) (2022-11-27) ### Bug Fixes * expect locales folder to be in astro's publicDir config by default ([ec72ff3](yassinedoghri/astro-i18next@ec72ff3)), closes [#64](yassinedoghri/astro-i18next#64) * import localizeUrl in HeadHrefLangs from index for access to astro-i18next runtime config ([5e3b96c](yassinedoghri/astro-i18next@5e3b96c)), closes [#65](yassinedoghri/astro-i18next#65) * **trans component:** import utility functions from index ([eea0d5d](yassinedoghri/astro-i18next@eea0d5d)) ### Features * **plugins:** set i18next plugins config for both server and client side setups ([5ddb1c7](yassinedoghri/astro-i18next@5ddb1c7)), closes [#68](yassinedoghri/astro-i18next#68)
The integration requires to have localization files in
public
directory (hardcoded). Therefore the integration breaks if the AstroConfig.publicDir
is configured differently.astro-i18next/src/index.ts
Line 75 in 603c4de
Can this be changed to using the AstroConfig.
publicDir
? If that is not possible, could the path be made configurable inastro-i18next.config.mjs
?The text was updated successfully, but these errors were encountered: