FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TranslationService

    struct · ferroui-protranslate · v0.5.0

    struct TranslationService
    

    UI-thread-local convenience entry point shared by native XAML consumers. Applications that need isolation can attach a source to a subtree instead.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    source

    fn source() -> TranslationBindingSource
    

    Source

    use_source

    fn use_source(source: TranslationBindingSource)
    

    Source

    use_service

    fn use_service(service: ferroui_protranslate_core::TranslationService)
    

    Source

    culture

    fn culture() -> Culture
    

    Source

    formatting_culture

    fn formatting_culture() -> Culture
    

    Source

    set_culture

    fn set_culture(culture: Culture) -> bool
    

    Source

    translate

    fn translate(key: &str) -> Result<String, TranslationError>
    

    Source

    t

    fn t(key: &str) -> Result<String, TranslationError>
    

    Source

    format

    fn format(key: &str, arguments: &[FormatArgument]) -> Result<String, TranslationError>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • StaticType
    • MarkupTyped

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.