pub fn detect_system_locale() -> Option<String>Expand description
What: Detect system locale from environment variables.
Inputs:
- None (reads from environment)
Output:
Option<String>containing locale code (e.g., “de-DE”) or None if not detectable
Details:
- Checks
LC_ALL,LC_MESSAGES, andLANGenvironment variables in order - Parses locale strings like “de_DE.UTF-8” -> “de-DE”
- Returns None if no valid locale found