Core state handling to fix subsites / translatable / etc
Right now we have _lots_ of ad-hoc cross-request state tracking.
State is any inputs that affects the cross-section of data that ends up being visible to DataObject
Versioned, Subsites, Translatable and several others are examples of this.
We already have DataQuery#$queryParams to track some of this state internally, but when it comes to tracking it across requests, every module has it's own solution.
The worst are those modules that store it in the session, since this affects all tabs / windows being used by that user, which can lead to unexpected behaviour.
This API would instead allow reading state encoded in domain names (i.e. en.example.com), URL portions (example.com/en), GET parameters (example.com?lang=en), headers (x-language: en) or in the worst case in session data, and then make sure all links & forms propagated that state in the preferred location.
SilverStripe have planned this item