feat: more work on M2, this time language selection

This commit is contained in:
2026-04-04 19:36:08 +02:00
parent 03dcaea88e
commit cbac412390
9 changed files with 146 additions and 67 deletions

View File

@@ -27,6 +27,17 @@ impl UiLocale {
pub fn all() -> &'static [UiLocale] {
&[Self::En, Self::De, Self::Fr, Self::It, Self::Es]
}
/// Unicode regional-indicator flag emoji for this locale.
pub fn flag_emoji(self) -> &'static str {
match self {
Self::En => "\u{1F1EC}\u{1F1E7}", // 🇬🇧
Self::De => "\u{1F1E9}\u{1F1EA}", // 🇩🇪
Self::Fr => "\u{1F1EB}\u{1F1F7}", // 🇫🇷
Self::It => "\u{1F1EE}\u{1F1F9}", // 🇮🇹
Self::Es => "\u{1F1EA}\u{1F1F8}", // 🇪🇸
}
}
}
impl std::fmt::Display for UiLocale {