//! Example showing how to localize strings
usestd::borrow::Cow;useicu_locale::{Locale, locale};usel10n_embed::Localize;constDEFAULT_LOCALE: Locale =locale!("en-US");fnmain(){// Create some strings
let static_str ="&str";let heap_allocated_string =String::from("String");let copy_on_write_str =Cow::from("Cow<str>");// Localize these strings, which just prints them.
// This would mostly be useful for non-localizable content such as usernames or URLs
println!("Static string: {}",
static_str.localize_for(&DEFAULT_LOCALE));println!("Heap allocated string: {}",
heap_allocated_string.localize_for(&DEFAULT_LOCALE));println!("Copy on write string: {}",
copy_on_write_str.localize_for(&DEFAULT_LOCALE));}