-
Notifications
You must be signed in to change notification settings - Fork 36
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
📜 Plans for v1.0.0 release #19
Comments
if there anything you need from us just let me know @yassinedoghri 👊 |
This sounds super awesome! |
Great! The Hot Module Reloading is a Must-have. Can't wait :) |
would be nice to have SSR with deno too, right now can't build : Cannot bundle Node.js built-in "fs" imported from "node_modules/i18next-fs-backend/esm/fs.cjs". Consider disabling ssr.noExternal or remove the built-in dependency. |
Hey @bobcafedev, i18next-fs-backend is not a dependency. It's a plugin you can install to load your translation files. Seeing its documentation, it can be used with deno. So in your /** @type {import('astro-i18next').AstroI18nextConfig} */
export default {
defaultLanguage: "en",
supportedLanguages: ["en", "fr"],
i18next: {
debug: true,
initImmediate: false,
backend: {
loadPath: "./src/locales/{{lng}}.json",
},
},
i18nextPlugins: { fsBackend: "https://deno.land/x/i18next_fs_backend/index.js" },
}; That being said, I've never used deno myself, and there maybe some more tweaking to be done in order to load i18next using its deno.land url. (https://deno.land/x/i18next/index.js) |
Is there any documentation for supporting plugins again? Using i18next-decode-postprocessor has been crucial for avoiding loading translated strings with special characters as html, e.g. via |
Not in beta.13. I'll add support for plugins in the next release. Sorry for the trouble. Edit: it's back on beta.14 |
@yassinedoghri is there any help you'd like around the |
@lorenzolewis I wouldn't mind the help, thank you! 🙂 Edit: I've created an issue where we can discuss the implementation. #108 |
@yassinedoghri is there a separate issue for tracking "astro's injectRoute function in the astro:config:setup to inject localized routes" ? |
@onionhammer just created it! #110 |
@yassinedoghri Edit: I'll be glad to help with it |
@Luxauram you will need to incorporate the language into your links as well, the |
Dude sorry, you look intelligent... I have a problem with i18next and 404. I actually can't localizePath with the 404. So when I'm in the second lang pages and I type some wrong urls I get redirect to the 404 WITH THE DEFAULT Lang, not the actual I'm into.... How is this manageable? Can you help me? |
Hey @yassinedoghri 👋 any updates? |
Plans for v1.0 release: abandon project |
astro-i18next
is currently in beta. Before releasing v1.0.0, some things need to be worked out, mainly to improve DX.Developers should be able to translate their Astro website / app as fast as possible --> reduce manual tasks to setup / use the integration.
Roadmap:
👉 removed in beta.13, astro-i18next takes care of the basic stuff (loading translation strings, locale detection, etc.)
👉 added back in beta.14 (5ddb1c7)
npx astro-i18next generate
: generate localized pages using command (based on config file) (how to add the lang folder to the baseLanguage. #13)👉 Having
routes.json
files alongside pages would be best for i18n collaboration (Support routes.json to localize URLS? #29)npx astro-i18next generate
command manually. #110❌ MAYBE NO NEED: Probably by creating a Vite plugin and adding it to the
astro:config:setup
hook.👉 use astro's injectRoute function in the
astro:config:setup
to inject localized routes during build time. The generate CLI tool would most probably be discarded.pages
folder wouldn't need to include localized pages anymore!✅ Works with node adapter
❌ Doesn't work with Netlify yet: Netlify deploy with SSR #26 - Reproduction
👉 Missing support for Deno
✅ Works with react
👉 try out with other frontend frameworks
npx astro-i18next extract
: extract the translation keys #108npx astro-i18next init
: automaticastro-i18next
setup / configEDIT 2022-11-06: beta.13 is now out and I'm getting closer to a clean and simple API for everyone. Any feedback is welcome!
The text was updated successfully, but these errors were encountered: