In the control panel, if you go to
Admin -> General Configuration
there is an option for setting the default language. The select dropdown contains the list of languages that are supported.
Is there a way to get this list of languages either in the templates or inside a plugin function?