sys-locale
A small and lightweight Rust library to get the current active locale on the system.
sys-locale is small library to get the current locale set for the system or application with the relevant platform APIs. The library is also no_std compatible, relying only on alloc, except on Linux and BSD.
Platform support currently includes:
- Android
- iOS
- macOS
- Linux, BSD, and other UNIX variations
- WebAssembly, for the following platforms:
- Inside of a web browser (via the
jsfeature) - Emscripten (via the
UNIXbackend) Further support for other WASM targets is dependent on upstream support in those target's runtimes and specifications.
- Inside of a web browser (via the
- Windows
use get_locale;
let locale = get_locale.unwrap_or_else;
println!;
MSRV
The Minimum Supported Rust Version is currently 1.48.0. This will be bumped to the latest stable version of Rust when needed.
Credits
Made with ❤️ by the 1Password team.