High-level internationalisation API

I have a leptos-based web app that I want to translate.

I'd like to use fluent. My needs aren't complex and I would be open to alternatives, but I don't want to learn or be tied to any homegrown, framework-specific translation format.

Looking at high-level APIs for fluent (selecting locales, providing a macro, embedding data into the executable), I'm aware of these alternatives:

  • fluent-fallback, from fluent-rs
  • fluent-templates, by XAMPPRocky (a prolific crate author I trust). Seems easy to use and doesn’t require proc-macros (though I already pay the syn tax with leptos)
  • i18n-embed / cargo-i18n, by kellpossible. I hit a papercut on first try (clap breakage) but it does provide a convenient proc macro (i18n-embed-fl)
  • l10n. An all-in-one crate by MathieuTricoire with another macro. I like that he contributed PRs to fix stuff in fluent-bundle; unfortunately the fluent-rs project has yet to cut releases with those (latest release was almost one year ago, for fluent-resmgr).
  • fluent-localization-loader / fluent-localization-bindgen by AEnterprise

Does anyone have any experience with these?

While looking into the lack of recent fluent releases (with the fixes for the l10n crate), I realized that ICU4X might start on support for its own way of localising strings, but this is years away, and the language might be overly complex (ICU4J example); I'd like to have recommendations I could work on now.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.