Replaces request.locale deliberately, bypassing the single-write guard.
The localization plugin's middleware calls it, for the reason
replacePrincipal documents. An application calls it to apply a
preference the middleware could not see — a signed-in user's saved locale
once authentication has run. A response cache keys on the locale present
when it runs, so call this before the cache lookup for the override to be
reflected there. Safe to call on a request that was never sealed.
Replaces
request.localedeliberately, bypassing the single-write guard.The localization plugin's middleware calls it, for the reason
replacePrincipaldocuments. An application calls it to apply a preference the middleware could not see — a signed-in user's saved locale once authentication has run. A response cache keys on the locale present when it runs, so call this before the cache lookup for the override to be reflected there. Safe to call on a request that was never sealed.