eulumdat-i18n 0.6.0

Internationalization for Eulumdat/ATLA photometric libraries
Documentation
  • Coverage
  • 5.57%
    36 out of 646 items documented1 out of 84 items with examples
  • Size
  • Source code size: 272.88 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 24.45 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 41s Average build duration of successful builds.
  • all releases: 37s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • holg/eulumdat-rs
    19 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • holg

Internationalization for Eulumdat/ATLA photometric libraries

This crate provides localized strings for:

  • SVG diagram labels (polar, cartesian, heatmap, spectral)
  • UI strings for web and mobile apps
  • Report generation

Supported Languages

  • English (en) - default
  • German (de)
  • Chinese Simplified (zh)
  • French (fr)
  • Italian (it)
  • Russian (ru)
  • Spanish (es)
  • Portuguese Brazilian (pt-BR)

Usage

use eulumdat_i18n::{Locale, Language};

// Get English locale (default)
let en = Locale::english();
assert_eq!(en.diagram.axis.gamma, "Gamma (γ)");

// Get German locale
let de = Locale::german();
assert_eq!(de.diagram.axis.intensity, "Lichtstärke (cd/klm)");

// Get by language code
let locale = Locale::for_language(Language::Chinese);
assert_eq!(locale.diagram.placeholder.no_data, "无数据");