Files
zeekay 595bb3b930 79 locales: right-to-left by script, regional variants in resolve
Add 43 locales to the registry, their loaders and catalogs: Persian,
Dari, Hebrew, Urdu, Pashto, Central Kurdish, Sindhi, Uyghur, Punjabi in
both scripts, four regional Arabics, Hong Kong Chinese, Mexican and
Argentine Spanish, European Portuguese, Canadian French, and 24 more.
34 wait for a native reader in review.json; ti, qu, gn, ay, bo and dv
are not shipped.

Every locale in Arabic or Hebrew script is rtl, and the registry test
derives the script from the tag. rtl.css selects on :dir(rtl), so it
holds inside a right-to-left region of a left-to-right page.

resolve no longer leans on registry order: after the exact tag and the
script, a request takes its own region, then the variant that serves it
(CLDR parents for es-419 and pt-PT, Macau to zh-HK, the Arabic dialect
areas), then the variant with no region, then the language's own region.
pnb reaches pa-PK.
2026-10-22 05:30:36 -07:00

13 lines
540 B
CSS

/*
* Text follows its direction; machine-readable content keeps its writing order.
* `:dir(rtl)` reads the direction an element inherits from the nearest `dir`
* attribute, so this holds on a right-to-left page and inside a right-to-left
* region of a left-to-right one, for every RTL locale, not one named language.
*/
:where(input[type='email'], input[type='url'], pre, code, [data-i18n-ltr]):dir(rtl) {
direction: ltr;
unicode-bidi: isolate;
text-align: start;
}
:where([data-i18n-mirror]):dir(rtl) { transform: scaleX(-1); }