translatable 1.0.0

A robust internationalization solution for Rust featuring compile-time validation, ISO 639-1 compliance, and TOML-based translation management.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use translatable::{Error, Language};

#[test]
pub fn runtime_error_outputs() {
    assert_eq!(
        Error::PathNotFound("path::to::translation".into()).cause(),
        "The path 'path::to::translation' could not be found"
    );

    assert_eq!(
        Error::LanguageNotAvailable(Language::ES, "path::to::translation".into()).cause(),
        "The language 'ES' ('Spanish') is not available for the path 'path::to::translation'"
    )
}