This commit is contained in:
Andras Schmelczer 2026-07-03 18:01:10 +01:00
parent c2070693fb
commit 909e241907
55 changed files with 594 additions and 223 deletions

View file

@ -2,6 +2,12 @@ pub const DEFAULT_LANGUAGE: &str = "en";
const SUPPORTED_LANGUAGES: &[&str] = &["en", "fr", "de", "zh", "hi", "hu"];
/// The set of language codes the frontend can render, used e.g. to emit
/// `hreflang` alternates for indexable pages.
pub fn supported_languages() -> &'static [&'static str] {
SUPPORTED_LANGUAGES
}
pub fn supported_language(value: &str) -> Option<&'static str> {
let value = value.trim().to_ascii_lowercase();
if value.is_empty() || value == "*" {