Expand description
Framework-independent, application-scoped localization and globalization.
Services are cheap Rc handles, intentionally bound to the owning thread.
Callbacks run synchronously after state changes, without internal borrows.
Dropping a subscription disconnects it, and observable strings hold services
without services retaining their observers.
Structs§
- Callback
Translation Provider - Host bridge for resource managers, localizer services, embedded stores, and
other application providers.
Ok(None)is a miss;Ok(Some(""))is a hit. Hosts remain responsible for callingTranslationService::refreshafter changing external data when already-bound values must refresh immediately. - Composite
Translation Provider - Ordered, composable providers. Provider failures remain in result diagnostics even if a later provider successfully resolves the value.
- Culture
- Canonical Unicode BCP-47 culture identifier. The empty name is invariant.
- Culture
Changed Event Args - Culture
Service - Explicit, application-scoped culture state. Does not mutate any process locale.
- Culture
Snapshot - Default
Localized Unit Formatter - Default
Measurement System Resolver - Default
Region Profile Provider - Default
Unit Conversion Service - Globalization
Service - InMemory
Translation Provider - Localized
Date Time - A Gregorian instant with an explicit UTC offset, suitable for
FormatArgument. - Localized
Naive Date Time - A wall-clock date/time with no inferred machine time zone.
newpreserves an unspecified value;utcexplicitly identifies the value as UTC. - Localized
String - Measurement
System Profile - Measurement
Value - Observable
Localized Snapshot - One coherent observation, including the resolved resource metadata and the independent UI and formatting cultures used to produce its display value.
- Observable
Localized String - ProTranslate
Diagnostic - Region
Profile - Immutable region metadata. Explicit profiles let hosts supply application or user overrides without changing culture, process state, or compiled CLDR data.
- Subscription
- Disconnects its callback on drop. Keep this value while observing a service.
- Translation
Cache Options - Translation
Fallback Options - Translation
Service
Enums§
- Format
Argument - Measurement
System - Measurement
Unit - Measurement
Unit Category - ProTranslate
Diagnostic Kind - ProTranslate
Diagnostic Severity - Text
Flow Direction - Translation
Error - A recoverable error from culture parsing, providers, formatting, or units.
- Translation
Format Failure Behavior - Translation
Provider Failure Behavior
Traits§
- Localized
Format - Extension point for application values (including dates, money, and domain types). It preserves typed formatting without reflection or string coercion.
- Localized
Unit Formatter - Measurement
System Resolver - ProTranslate
Diagnostic Sink - Region
Profile Provider - Translation
Provider - A provider performs one exact-culture lookup; the service owns fallback. Empty values are successful translations. Failures are distinct from misses.
- Unit
Conversion Service
Functions§
- format_
composite - Composite formatting with positional arguments, alignment and escaped braces. Alignment counts UTF-16 code units to preserve the source format contract.
- placeholder_
indexes - Validate the composite grammar and return sorted, distinct argument indexes.
- required_
argument_ count - validate_
translation_ key - Validate a resource key at a provider boundary, including direct lookups that do not pass through a translation service.