When signing in and creating a new Odoo user session, the user language is checked in the user preferences and set in the lang context key. This is then used to format the outputs appropriately: the source texts are translated to the user language, and the dates and numbers are formatted according to the language's current locale settings.