How does WordPress know wich language is chosen when there is a database connection error

How does WordPress know wich language is chosen when there is a database connection error