9 unstable releases (4 breaking)

0.9.0 Oct 30, 2023
0.8.1 Oct 25, 2023
0.7.0 Sep 14, 2022
0.6.0 Sep 1, 2022
0.5.3 Sep 1, 2022

#78 in Internationalization (i18n)

23 downloads per month


466 lines

embedded_lang: Embedded language resources for rust applications

Crates.io Build Status License

A small library to provide translation strings as an embedded resource Language files are in JSON format and will be embedded into the binary at compile time.

Please see the examples directory for language file samples

Usage example:

use embedded_lang::{ LanguageSet, embedded_language };

fn main() {
    let mut translator = LanguageSet::new("fr", &[

    assert_eq!(translator["tree"], "arbre".to_string());

LanguageSets have a current language, and a fallback language from which strings will be fetched if the current language is missing the requested string.


~33K SLoC