leptos-fluent
leptos-fluent copied to clipboard
Follow `static_loader!` definition
AFAIK, seems possible the reading of the source code to search for the location of the fluent-templates static_loader!
macro definition and parse its content:
static_loader! {
static TRANSLATIONS = {
locales: "./locales",
fallback_language: "en",
};
}
Because we are passing TRANSLATIONS
to leptos_fluent!
macro, we can know where is defined. Even if is not inside the current file, altough that case could be a bit difficult.
This will allow to not need to duplicate the locales: "..."
argument and the future argument core_locales: "..."
(see #89).