module std::languagessource
The system's languages and which way a language is written, apart from std::locale so that a program asking only these loads none of CLDR's locale tables (alloy-ui's REFOCUS.md, R6e): what an app's language and direction are chosen by.
expect(writes_right_to_left(&"ar-EG") && writes_right_to_left(&"he"));
expect(!writes_right_to_left(&"fr") && writes_right_to_left(&"pa-Arab"));
fn preferred_languagessource
exp fn preferred_languages() -> Vector<String>
The system's languages, most wanted first, as BCP 47 tags (ar-EG,
en): LANGUAGE's, then the first of LC_ALL, LC_MESSAGES and
LANG set, on Linux and under WASI (C and POSIX left out);
GetUserPreferredUILanguages on Windows; CFLocaleCopyPreferredLanguages
on macOS; navigator.languages on the web. Empty when it names none.
Reads none of the locales' tables.
fn writes_right_to_leftsource
exp fn writes_right_to_left(tag: &[u8]) -> bool
Whether text in the language the tag names is written right to left:
by the script it names (Arab, Hebr, Thaa, ...), else by its language
(ar, fa, he, ur, ...), from CLDR as right_to_left() is, but from a
list of their names rather than the locales' tables.