| 1 | //! Inspect CGI environment variables for locale configuration |
|---|---|
| 2 | |
| 3 | use std::env; |
| 4 | use super::{Locale}; |
| 5 | |
| 6 | pub fn system_locale() -> Option<Locale> { |
| 7 | if let Ok(al: String) = env::var(key:"HTTP_ACCEPT_LANGUAGE") { |
| 8 | Locale::new(al.as_ref()).ok() |
| 9 | } else { |
| 10 | None |
| 11 | } |
| 12 | } |
| 13 |
