Here are a couple of ways to return information on all languages in SQL Server. One method uses a system compatibility view, the other method executes a system stored procedure. Both methods return the same result.
The syslanguages
System Compatibility View
The sys.syslanguages
system compatibility view returns information about all languages in SQL Server. It returns information such as the language name, its alias, its date format, and even the names of the months, short months, days, etc.
As with any view, you can select just those columns you’re interested in. So if you just want a list of the language names or aliases, you can select just those columns.
Here’s how to select all languages and their aliases in SQL Server:
SELECT name, alias FROM sys.syslanguages;
And here’s the result I get in SQL Server 2017:
+--------------------+---------------------+ | name | alias | |--------------------+---------------------| | us_english | English | | Deutsch | German | | Français | French | | 日本語 | Japanese | | Dansk | Danish | | Español | Spanish | | Italiano | Italian | | Nederlands | Dutch | | Norsk | Norwegian | | Português | Portuguese | | Suomi | Finnish | | Svenska | Swedish | | čeština | Czech | | magyar | Hungarian | | polski | Polish | | română | Romanian | | hrvatski | Croatian | | slovenčina | Slovak | | slovenski | Slovenian | | ελληνικά | Greek | | български | Bulgarian | | русский | Russian | | Türkçe | Turkish | | British | British English | | eesti | Estonian | | latviešu | Latvian | | lietuvių | Lithuanian | | Português (Brasil) | Brazilian | | 繁體中文 | Traditional Chinese | | 한국어 | Korean | | 简体中文 | Simplified Chinese | | Arabic | Arabic | | ไทย | Thai | | norsk (bokmål) | Bokmål | +--------------------+---------------------+
The sp_helplanguage
System Stored Procedure
Alternatively, you can use the sp_helplanguage
system stored procedure. This stored procedure returns information about all languages in SQL Server, or about a particular language if one is specified.
It actually returns its data from the sys.syslanguages
compatibility view mentioned above.
To specify a language simply pass the language name or alias to the stored procedure when calling it. If no language is specified, all languages are returned.
Here’s an example of returning information about a particular language:
EXEC sp_helplanguage Swedish;
Result (using vertical output):
-[ RECORD 1 ]------------------------- langid | 11 dateformat | ymd datefirst | 1 upgrade | 0 name | Svenska alias | Swedish months | januari,februari,mars,april,maj,juni,juli,augusti,september,oktober,november,december shortmonths | jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec days | måndag,tisdag,onsdag,torsdag,fredag,lördag,söndag lcid | 1053 msglangid | 1053
And here’s what you’d do if you want all languages returned:
EXEC sp_helplanguage;
In SQL Server 2017, this returns 34 languages with their associated information (quite a long list). Fortunately I previously created a separate article that lists all 34 languages and their date formats in SQL Server 2017.