//! Example showing how to localize paths
usecamino::Utf8PathBuf;useicu_locale::{Locale, locale};usel10n_embed::Localize;constDEFAULT_LOCALE: Locale =locale!("en-US");fnmain()->Result<(), std::io::Error>{// Create some paths
let current_directory =std::env::current_dir()?;let current_directory_utf8 =Utf8PathBuf::from_path_buf(current_directory.clone()).unwrap();// Localize these paths, which just prints the path as a string (lossily if using std::path)
println!("Current directory: {}",
current_directory.localize_for(&DEFAULT_LOCALE));println!("Current directory (UTF-8): {}",
current_directory_utf8.localize_for(&DEFAULT_LOCALE));Ok(())}