internalization for Leptos #1505
Baptistemontan
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
Looks very cool! Apologies for not responding sooner to the other thread. I have used |
Beta Was this translation helpful? Give feedback.
1 reply
-
Check simple-icons-website-rs for an example of Fluent usage with Leptos, especially the i18n/ crate and language_selector.rs file. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started a discussion the other day about i18n support for leptos as I did not found any crate for it, so I started my own thing, and I went into the rabbit hole. I made it so it load locales at compile time and create a struct that mirror the given locales, I made a simple exemple if you want to check it out.
repo link: https://github.com/Baptistemontan/leptos_i18n
you need to create a
i18n.json
file:and the the locales files:
some context need to be created and a macro to be executed
Then you can do
anywhere in your app, with ssr or hydrate, and have easy internalization!
For now it only supports actix but I'll work on axum in the next days, should'nt be that much work.
Beta Was this translation helpful? Give feedback.
All reactions