The locale + direction model (saastarter-parity Phase 1). saastarter hardcodes its locale set
(SupportedLocale = "en" | "ar" | "es", locale.ts:3) and reads the cookie via next/headers (locale.ts:1,9) —
neither is reusable. This GENERICIZES the set into a config (the app declares its own locales) and makes
resolution FRAMEWORK-AGNOSTIC + Workers-safe (a cookie string / a standard Request, never next/headers).
Direction (RTL) — which saastarter sets ad-hoc in markup — is modeled here as dirOf.
The locale + direction model (saastarter-parity Phase 1). saastarter hardcodes its locale set (
SupportedLocale = "en" | "ar" | "es", locale.ts:3) and reads the cookie vianext/headers(locale.ts:1,9) — neither is reusable. This GENERICIZES the set into a config (the app declares its own locales) and makes resolution FRAMEWORK-AGNOSTIC + Workers-safe (a cookie string / a standard Request, nevernext/headers). Direction (RTL) — which saastarter sets ad-hoc in markup — is modeled here asdirOf.