Optional ReadonlycookieThe cookie that selects a locale; false disables it. Default
'setu_locale'. While enabled, every governed response carries
Vary: Cookie — correct, and costly for CDN caching, which is why it can
be turned off.
Optional ReadonlyexcludePaths the middleware skips entirely: no resolution, no headers. Default
the six operational paths (/live, /ready, /health, /metrics,
/openapi.json, /docs); [] disables exclusion.
Optional ReadonlyqueryThe query parameter that selects a locale; false disables it. Default 'locale'.
ReadonlysupportedThe supported BCP 47 tags; the first is the default.
Optional ReadonlytenantA tenant's default locale, consulted after Accept-Language when the
request carries a resolved tenant (the tenancy middleware runs at 40,
before this one at 45). Its answer is matched like any candidate. A throw
propagates: this is application code, not client input.
Options for
localeMiddleware: how the request locale is resolved.Resolution tries, in order, the query parameter, the cookie,
Accept-Language,tenantLocale, and finally the default — the first entry ofsupportedLocales. Every candidate is matched againstsupportedLocalesonly.Since
0.9.0