cargo-i18n icon indicating copy to clipboard operation
cargo-i18n copied to clipboard

Different fluent localization files for different rust modules inside one localization domain

Open rostamn739 opened this issue 4 years ago • 1 comments

I have a crate that contains several modules for which I want to embed the localization resources

Suppose my crate is structured as: -- lib.rs -- mod1 ---- file1.rs

I expect the i18n-embed system to search for localization files in

-- i18n/my-crate/mod1/file.ftl

But all it does ever consider is a single file {domain.ftl} (e.g. my-crate.ftl) which is used for all the tranlsation strings across my crate

Is there a way to avoid clumping of every single localized string into a single Fluent file?

rostamn739 avatar Nov 15 '21 13:11 rostamn739

Hi, sorry for the slow reply! At the moment I don't think this behaviour is supported. I'm curious are you using any localization management tools, and if so do they also support having a split by module like this? If there is some established tooling support for this layout I could be convinced to implement the feature myself, otherwise I would also be open to a PR for implementing this.

kellpossible avatar Nov 29 '21 08:11 kellpossible