How to add dropdown language toggle in the top menu (like user menu)

Hello,
how to add dropdown language toggle in the top menu? I understand this requires template modification. What should I add to the template?
Regards
Piotr