Rust

Crate root

Module
What utopia_locale defines at its root.

Contents

use utopia_locale::Languages;
Rust
pub struct Languages

Every registered language, and whether missing languages and keys are errors.

Also implements Default.
use utopia_locale::Locale;
Rust
pub struct Locale<'a>

A view of Languages with a default and an optional fallback language.

use utopia_locale::Error;
Rust
pub enum Error

Why a lookup or a language registration failed.

use utopia_locale::Missing;
Rust
pub enum Missing<'a>

What Locale::text returns for a key no language has.

Rust
pub type Translations = IndexMap<String, String>

Translations of one language, in file order.

Rust
pub const DEFAULT_DYNAMIC_KEY: &str = "[[defaultDynamicKey]]"

A marker text that, passed as Missing::Text, means Missing::Key.