This document describes how to build a multi-tenant Rails application that can handle multiple domains and languages. It introduces a Website model to store domain and language configuration and a WebsiteSwitcher middleware that sets the current website based on the domain. The middleware initializes a WebsiteSwitcher using the request host, finds the corresponding Website, and sets it as the current website along with its language before the request is passed to the application. This allows a single Rails app to serve different content and languages depending on the domain or host.