How can I optimize a character in regards to known languages? Unearthed Arcana, Multiclassing and such are allowed, as are feats. I am not interested in every single possibility to get a language, but a way to get a lot of languages without investing too much. For example, going Mastermind (3 levels in Rogue) would bring two languages, compared to only one language from Cavalier (3 levels in fighter).
This is similiar, but distinct from Every language character optimization, as this questions aims to find a way to actually learn the languages, not find a way to speak/read/write every language.