Hi all,
is there a chance to check if a locale exists?
GetLocale()
show the current locale
GetLocaleInfo()
shows addition informations to the current locale
SetLocale( "zw_CH" )
throws an exception as zw_CH
is invalid
WriteDump(server.coldfusion.supportedlocales)
shows a list of locales but i prefer the shortnames (e.g. “FR_CH” instead of “french (switzerland)”.).
Is there a chance to validate if “fr_CH” exists without try/catches? Is there a way to rewrite the long supportedlocales
to shortnames (without looping and getLocaleInfo for each longname?)?
Don’t forget to tell us about your stack!
OS: linux / windows / docker
Java Version: 11.0.16 (Oracle Corporation) 64bit
Tomcat Version: Apache Tomcat/9.0.65
Lucee Version: Lucee 5.3.9.166