On the Command/language page:
Change the hyphenation rules, quotation marks, all that sort of thing, to that of a different language. (The default language is English.)
Testing showed that \mainlanguage sets both \currentlanguage and \currentmainlanguage to the same value, while \language sets \currentlanguage only.
My suggestion is to add info to this behaviour to the mainlanguage page, reflecting the fact that \mainlanguage does set both \currentlanguage and \currentmainlanguage.Which is not apparent from the current documentation.
Another solution would be to separate \language and \mainlanguage completely. An option I would prefer for clarity, because now the order of calling \language and \mainlanguage makes a difference.