Joe Webb

Musing and observations about SQL Server, other technogies, and sometimes just life in general
posts - 85, comments - 857, trackbacks - 0

My Links

News

This blog has moved!

Click here for the new location.

Follow me on Twitter
Add to Technorati Favorites

Search this Blog
 




Archives

Post Categories

About me

The 33 languages of SQL Server

I was recently perusing the the MSDN SQL Server forums and noticed a question about localization of Microsoft SQL Server messages. I replied to the post with a mention of the sys.messages table - the table where SQL Server messages are stored. I blogged about this system table a few months ago.

Afterward I started playing around some more with the sys.messages table. I started with the following basic query.

 languages1-2008-05-30

The first thing to notice is that each message_id has one or more languages associated with it. Message_id 21, for example, has a row for language_id 1033, 1031, 1036, etc. It's fairly obvious to me that language_id 1033 is my native tongue, English. And I can make some educated guesses on some of the other languages. But where are they defined?

Well, the syslanguages system table contains a list of each language that SQL Server recognizes. For example, run the following query in a Management Studio Query Window.

languages2-2008-05-30

1033 is indeed US English. And 1031 is German, 1036 is French, and so on. There are 33 languages in all - US English and British English are considered two different languages in here, though they share the same messages.

But what's interesting is that not all languages in the syslanguages system table are represented in the sys.messages table. For example, consider the following query.

SELECT 
m.language_id
,l.alias
,COUNT(*)
FROM
sys.messages AS m JOIN
 syslanguages AS l
ON l.msglangid = m.language_id
GROUP BY
l.alias
,m.language_id

 

The results indicate that only 11 languages (10 if you consider US English and British English to be one and the same) are represented in the sys.messages table. 

languages3-2008-05-30

So, that must mean that the other languages don't have a need for messages. :) Right, if that's that case, remove US English from the list!

Actually if a language is not present in the sys.messages table, a default language will be used instead. For more information, check out the sp_addmessage procedure and the sys.messasges system table in Books Online.

Cheers!

Joe

kick it on DotNetKicks.com

Print | posted on Friday, May 30, 2008 3:54 PM | Filed Under [ T-SQL SQL Server ]

Feedback

Gravatar

# re: The 33 languages of SQL Server

Joe: what tool do you use to get those screen grabs with the jagged edges?
7/12/2008 12:17 AM | Bennie Ribaldi
Gravatar

# re: The 33 languages of SQL Server

I use SnagIt for the screenshots. It's a great product.
7/12/2008 9:21 AM | Joe Webb
Gravatar

# re: The 33 languages of SQL Server

Cheers,

nice one. The query needed a sys. in front of syslanguages to work for me:

SELECT
m.language_id
,l.alias
,COUNT(*)
FROM
sys.messages AS m JOIN
SYS.syslanguages AS l
ON l.msglangid = m.language_id
GROUP BY
l.alias
,m.language_id
7/14/2010 12:53 PM | Arthur Kirchner
Gravatar

# re: The 33 languages of SQL Server

It's fairly obvious to me that language_id 1033 is my native tongue, English. And I can make some educated guesses on some of the other languages. But where are they defined?


snow boots | snow boots for women | columbia sportswear | columbia sportswear outlet | cheap north face jackets | the north face outlet | mac makeup | cheap makeup
10/19/2010 4:37 AM | furry boots
Gravatar

# re: The 33 languages of SQL Server

This super video converter for mac is developed by Emicsoft Studio, it is currently the best video converter running under Mac os x, comparied by isqunite, Visualhub and other Video Converter for Mac Free vide under simple video editing function embedded, support TRIM, CUT, CROP, and Join video files. you may
10/26/2010 1:38 AM | hanly
Gravatar

# re: The 33 languages of SQL Server

I am very thankful to you for posting such stuff.This really help me lot.I really appreciate your work.Wow, that looks so good!
8/2/2011 12:42 AM | registryspeeder
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET