Welcome to the Internationalisation (I18n) project.
This Internationalisation project is a simple extension to the ICU4X project (maintained by the Unicode Consortium), by providing a localisation system, and adding macro functionality to patterns when formatting strings for locales (language tags).
The repository contains the following crates:
-
i18n
: The convenience meta crate that contains selected available crates, -
i18n_lexer
: A simple lexer to tokenise a string, -
i18n_localiser
: The multilingual localisation system, -
i18n_provider
: Trait for providing language strings, and error struct, -
i18n_provider_sqlite3
: Implementation ofi18n_provider
using Sqlite3 as its data store, -
i18n_utility
: Contains theLanguageTagRegistry`
, and theTaggedString
type.
Note
|
All these crates on crates.io have the names appended with the suffix -rizzen-yazston to distinguish them from internationalisation crates created by other authors.
|
Available features for i18n
crate:
-
icu_blob
: Allow for instances ofBlobDataProvider
to be used various ICU4X components that supports {BufferProvider}[BufferProvider
]. An alternative provider when the internal data of ICU4X components are insufficient for a particular use case. -
icu_compiled_data
[default]: Allow for the internal data of the various ICU4X components. -
icu_extended
: Use the more detailed ICU information structs, types, and methods. -
icu_fs
: Allow for instances ofFsDataProvider
to be used various ICU4X components that supportsBufferProvider
. An alternative provider when the internal data of ICU4X components are insufficient for a particular use case. -
logging
: To provide some logging information. -
sync
: Allow for rust’s concurrency capabilities to be used. Use ofArc
andMutex
insteadRc
andRefCell
.
Stefano Angeleri for advice on various design aspects of implementing the components of the internationalisation project, and also providing the Italian translation of error message strings.
For most use cases, just using the i18n-rizzen-yazston
crate would be sufficient to use the localisation system, though the individual crates can be selected individual if the entire i18n
project is not required.