Languagemiddleware
LanguageMiddleware picks the correct translation set based on the route, the session or the configured default.
It updates the Language object and session so calls to lang() return the proper text, and logs diagnostic info when debug mode is active.