In Java, you can call Locale.getAvailableLocales() to get the list of available locales.
Locale.getAvailableLocales()
I was expecting an equivalent from the PHP Locale class, but co
system("locale -a|grep XX"); where XX is language code ie. system("locale -a|grep de");
system("locale -a|grep XX");
XX
system("locale -a|grep de");