Get available languages in widget


I’m developing a plugin that creates a widget. This widget needs to have access to the available site languages. How do I get them? I tried with site()->languages() but it returns NULL.


Never mind, I was on a branch where the site was not yet multi-lingual.