Skip to main content

ferroui_protranslate/
lib.rs

1//! ProTranslate localization integrated with FerroUI's native property and binding systems.
2//!
3//! Services and UI objects are owned by the UI thread. Configure a
4//! [`TranslationBindingSource`] explicitly, then use [`TranslateExtension`] or the
5//! attached properties on [`Translation`]. Cross-thread producers must post culture
6//! changes to the UI dispatcher; no UI object is made `Send` or `Sync`.
7
8extern crate self as ferroui_protranslate;
9
10mod binding_source;
11#[cfg(feature = "dependency-injection")]
12mod dependency_injection;
13mod extensions;
14mod register_types;
15mod rust_paths;
16mod source_observation;
17mod translation;
18mod translation_service;
19
20pub use binding_source::TranslationBindingSource;
21#[cfg(feature = "dependency-injection")]
22pub use dependency_injection::{
23    ProTranslateServiceCollectionExtensions, ProTranslateServiceProviderExtensions,
24};
25pub use extensions::{FExtension, FormatExtension, TExtension, TranslateExtension};
26pub use register_types::{register_types, ASSEMBLY};
27pub use translation::Translation;
28pub use translation_service::TranslationService;
29
30#[cfg(test)]
31mod tests;