#localization #icu4x

i18n_provider-rizzen-yazston

The i18n_provider crate of the Internationalisation project

8 releases (4 breaking)

0.10.1 Nov 15, 2024
0.10.0 Aug 2, 2024
0.9.2 Jul 23, 2024
0.9.1 Mar 24, 2024
0.6.1 Jul 6, 2023

#380 in Internationalization (i18n)

Download history 15/week @ 2024-08-05 13/week @ 2024-08-12 1/week @ 2024-08-19 7/week @ 2024-08-26 26/week @ 2024-09-16 24/week @ 2024-09-23 22/week @ 2024-09-30 1/week @ 2024-10-07 7/week @ 2024-10-14 4/week @ 2024-11-04 119/week @ 2024-11-11 30/week @ 2024-11-18

153 downloads per month
Used in 5 crates (4 directly)

BSD-3-Clause

65KB
838 lines

i18n_provider

Rizzen Yazston

Welcome to the i18n_provider crate of the Internationalisation (i18n) project.

This crate consists of two modules:

  • error: Contains the enum for common errors regardless of the implementation of the localisation provider trait,

  • provider: The localisation provider trait.

Features

Available features for i18n_provider crate:

  • sync: Allow for rust's concurrency capabilities to be used. Use of Arc and Mutex instead Rc and RefCell.

Modules

provider: A language string provider.

A trait for retrieving localisation language strings from a data repository via a provider that implements the trait methods: strings() and string(). In addition, there are other trait methods for retrieve the default language for a component, and supported languages for entire data repository, component and identifier respectively.

For an implementation example, see the i18n_provider_sqlite3-rizzen-yazston crate, which uses Sqlite3 for its data store.

Acknowledgement

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.

Dependencies

~4MB
~75K SLoC