1
0
Fork 0
firefox/third_party/rust/sys-locale/examples/get_locale.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

11 lines
317 B
Rust

//! A small example to run on your computer to see what locale the library returns.
#![allow(unknown_lints)]
#![allow(clippy::uninlined_format_args)]
use sys_locale::get_locale;
fn main() {
let locale = get_locale().unwrap_or_else(|| String::from("en-US"));
println!("The current locale is {}", locale);
}