pub struct LanguageSet { /* private fields */ }
Expand description

A searchable set of language string instances

Implementations

Create a new language instance

Arguments
  • fallback_language - Language code for the fallback language
  • languages - Array of language instances to use

Return the set’s fallback language

Return the set’s current language

Add a language to the set

Arguments
  • language - New language

Add a language from a JSON file to the set

Arguments
  • language - New language

Set the fallback language for lookups

Arguments
  • language - New language

Set the current language for lookups

Arguments
  • language - New language

Look up a string in a specific language

Arguments
  • language - Language to search
  • name - String to find

Look up a string

Arguments
  • name - String to find

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.