ok
This commit is contained in:
parent
c2070693fb
commit
909e241907
55 changed files with 594 additions and 223 deletions
|
|
@ -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 == "*" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue