I do know how to get a list of all available locales in english using the method getAvailableLocales() of the class SimpleDateFormat in Java. But I want to get it in spanish.
I'm not sure, but it seems that you want to get all locales in Spanish language. It can be made as:
Locale.setDefault(new Locale("ES"));
Locale[] locales = SimpleDateFormat.getAvailableLocales();
for(Locale l : locales) {
System.out.println(l.getDisplayName());
}
At first you have to set default locale to Spanish and get all locales.