pub trait LocalizationContext {
// Required methods
fn locale(&self) -> LanguageIdentifier;
fn localizations(&self) -> &Localizations;
fn invalidate_when_changed(&self, trackable: &impl Trackable);
}
Expand description
A context that is used while localizing values.
Required Methods§
sourcefn localizations(&self) -> &Localizations
fn localizations(&self) -> &Localizations
Returns the localizations for this context.
sourcefn invalidate_when_changed(&self, trackable: &impl Trackable)
fn invalidate_when_changed(&self, trackable: &impl Trackable)
Invalidates trackable
when changed.
Some values are localized outside of the context of a window being opened: for example, the Window’s title. In situations like these, invalidation is ignored.
Object Safety§
This trait is not object safe.