Trait rosetta_i18n::Language[][src]

pub trait Language: Sized {
    fn from_language_id(language_id: &LanguageId<'_>) -> Option<Self>;
fn language_id(&self) -> LanguageId<'_>;
fn fallback() -> Self; }
Expand description

Trait implemented by languages structs generated by rosetta-build.

Required methods

Initialize this type from a LanguageId.

The method returns None if the provided language id is not supported by the struct.

Convert this struct to a LanguageId.

Get the fallback language of this type.

This fallback value can be used like a default value.

Implementors