1Password / sys-locale

A small and lightweight Rust library to obtain the active locale on the system.
Apache License 2.0
75 stars 15 forks source link

Add full preference-order locale support to Apple targets #24

Closed complexspaces closed 1 year ago

complexspaces commented 1 year ago

This PR follows up #22 by adding proper locale list iteration to the macOS and iOS implementation. Now if a user has multiple preferred languages on these OSes applications will be able to observe them as-intended.

For example, here is macOS 13 configured with the following languages:

image
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running unittests src/lib.rs (target/debug/deps/sys_locale-4bef307f8598d700)

running 1 test
en-US
es-US
ja-US
test tests::can_obtain_locale ... ok

Relates to #14