my understanding is that the supported locales are controlled by JDK, Pega does not control that, see the list from Oracle: JDK 6 and JRE 6 Supported Locales. The article suggests that 'es' is used by JRE for user interface translation. Let's see if SMEs have more insights. Maybe you can also provide more details what your use cases are?
Kevin, that's correct, you need to use one of those specific codes. I've seen a case where a currency control wasn't working correctly if the local was not an explicitly Java supported one (in the format of aa_BB). So in this case, you'd need to pick something like es_ES.
I want to provide the users an ability to change their locale from the UI at runtime. I did not find details other than below specifically the looking for the details on the use of PublicAPI function setLocaleName(). I appreciate further details.
Changing locale programmatically
An activity can change a user locale temporarily by calling the PublicAPI function setLocaleName(). For example, a multilingual worker might switch between English and Spanish rapidly, to match the speech of an incoming caller, by clicking a button on the Process Work workspace.
This lets your application implement a user selection of locale (as application users do not ordinarily have access to the Locale Settings tool).