• How can I list the supported regional ISO codes per the version I work on?
I need to check an ISO 639-1 (2 characters) language code to see if it is supported. You don't get a default reply for versions prior to 2019. It throws an error.
Example for the requirement:
select format(current_timestamp,'dd-MMMM-yyyy','es')
select format(current_timestamp,'dd-MMMM-yyyy','mn')
select format(current_timestamp,'dd-MMMM-yyyy','ii')
select format(current_timestamp,'dd-MMMM-yyyy','oo')
select format(current_timestamp,'dd-MMMM-yyyy','qq')
The above will return 2 errors on (my) v.2016 – The culture parameter 'oo' provided in the function call is not supported. The culture parameter 'qq' provided in the function call is not supported.
This doesn't match the definitions listed in sys.syslanguages And that table does not include the iso code either.
Thank you!
Per martin's answer, this differs from one environment to another. The ugly way will work, yet a list from the internal tables to work on would be nice.