• L' Eomot Inversé (3/19/2013)


    Hugo Kornelis (3/19/2013)


    I turned out to be right, but the reference leaves me wanting more. It points to a list of language codes in the format xx-YY (four letters seperated by a dash), not the three-letter format required for thesaurus files. It appears as if the three-letter format is always found by removing the dash and the last letter from the listed language code, but this is not described on that web page. And after following the link on that page to http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx (which is listed as being documentation for Windows Vista!), I see a table that suggests that this is not the case - but that also includes many languages that I believe not to be supported by SQL Server, so I'm not sure how relevant this is.

    Can anyone fill me in on the missing details?

    Well, the only way I know to get this is to start with the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSearch\Language]\MSSearch\Language or the equivalent on your machine (on my machine MSSQL10_50.MSSQLSERVER is the directory name for the instance of SQL server within the MSSQL directory). Each subkey under that includes a mapping from template xml filename to locale ID - the subkey name is sometimes in the three character format, sometimes in the 5-character format, but the values are always the filename using the 3-character format. This will provide all 48 (or 44, excluding duplicates) of the 33 (:w00t:) supported languages.

    Mappings from 33 locale ids to language are given on the sys.languages BOL page. What the other 15 locale ids is probably documented somewhere else, but may be irrelevant.

    Thanks, Tom!

    It's simply incredible that Microsoft makes it so hard to find the correct file to use for adding thesaurus entries for a language.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/