Crate tinymist_l10n

Source
Expand description

Tinymist’s localization library.

Macros§

bail
Returns an error with a translated message.
t
Tries to translate a string to the current language.

Enums§

Arg
An argument for a translation.

Traits§

DebugL10n
Converts an object to an argument of debug message.

Functions§

deserialize
Deserializes a TOML string into a map of translations.
load_translations
Loads a TOML string into a map of translations.
serialize_translations
Writes a map of translations to a TOML string.
set_locale
Sets the current locale.
set_translations
Sets the current translations. It can only be called once.
t_with_args
Tries to translate a string to the current language.
t_without_args
Tries to translate a string to the current language.
update_disk_translations
Updates disk translations with new key-value pairs.
update_translations
Updates a map of translations with new key-value pairs.

Type Aliases§

TranslationMap
A map of translations.
TranslationMapSet
A set of translation maps.