When I try to use the locale, I am idendifying it automatically like
let current_locale = sys_locale::get_locale().unwrap_or_else(|| String::from("en-US"));
This produces de-DE or en-US.
But:
let a = Locale::from_name("de-CH"); // ok
let b = Locale::from_name("de-DE"); // not found, here only 'de' can be used
let c = Locale::from_name("en-US"); // not found, here only 'en' can be used
let d = Locale::from_name("en-HK"); // ok
It would be nice if the crate would automatically fallback to the 2 digit allowed locale.
I am not sure if this is intended behavior.
When I try to use the locale, I am idendifying it automatically like
let current_locale = sys_locale::get_locale().unwrap_or_else(|| String::from("en-US"));
This produces de-DE or en-US.
But:
It would be nice if the crate would automatically fallback to the 2 digit allowed locale.