Found a better way to list languages: Keep a list of available locale in
a file. Works rather well.
TODO: unit test, comment, improve error handling and clean code.