| Crates.io | iso639_rust |
| lib.rs | iso639_rust |
| version | 0.1.0 |
| created_at | 2025-08-04 17:25:35.627883+00 |
| updated_at | 2025-08-04 17:25:35.627883+00 |
| description | A super cool ISO 639 language code library in Rust. |
| homepage | |
| repository | https://github.com/sumitsharansatsangi/iso639_rust |
| max_upload_size | |
| id | 1780969 |
| size | 1,912,095 |
A comprehensive, fast, and idiomatic Rust library for ISO 639 language codes — supporting language identification, conversion between two-letter and three-letter codes, detection of deprecated codes, and more.
This crate is a Rust port inspired by the popular iso639-lang Python library, covering ISO 639-1, ISO 639-2, ISO 639-3 and ISO 639-5 standards.
name, pt1 (2-letter code), pt2b, pt2t, pt3 (3-letter code), pt5)Add this to your Cargo.toml:
[dependencies]
iso639_rust = "0.1.0"
use iso639_rust::{Lang, is_language};
let lang = Lang::new(Some("deu"), None, None, None, None, None, None).unwrap();
assert_eq!(lang.name, "German");
assert_eq!(lang.pt1, "de");
assert_eq!(lang.pt3, "deu");
let french = Lang::new(Some("fr"), None, None, None, None, None, None).unwrap();
println!("'fr' => pt3: {}", french.pt3); // prints "fra"
println!("'fr' => name: {}", french.name); // prints "French"
Contributions welcome! If you find bugs, or want to improve data handling and add features, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.