Crate sorrow_i18n

Crate sorrow_i18n 

Source
Expand description

Implements a simpler version of I18n. Supports 2 built-in data providers (for static projects where the files do not change and where the localization file can be changed by the user or developer). For other cases, you can write your own data provider. Github project Crates

Structs§

Data
We work with a mutable data ref.
FileStructure
Default structure by file localization.
Holder
The simplest information keeper. Contains a link to the data itself that can be dynamically updated. The locale for determining what this state refers to. And also, the provider who is responsible for the volatility of the data.
InternationalCore
Holder for localization map.
UnWatchData
Works with an ordinary hash map, useful when the data never changes. It’s simple wrapper.

Enums§

I18nError
Library errors
Providers
Base providers

Traits§

GetData
Getting data by holder’s.
WatchProvider
Implementation of the state observer. You can implement your own observer and add it to the MessageHolder, for this see an example in examples/custom_provider.rs

Type Aliases§

Error
Error type