INF: Installing Additional Languages on SQL Server

ID: Q169749


The information in this article applies to:


SUMMARY

SQL Server provides the ability to support multiple languages on one server engine. However, there are several steps you must perform before you can take advantage of this functionality.


MORE INFORMATION

Installation

The installation of different languages causes the master database to grow for about 2 MB per language. Due to this growth, you have to alter the master database and take care that the system segment gets all the allocated memory.

There is an executable file, Langinst.exe, in the Mssql\Binn directory that installs the additional languages for you through the SQL Setup application. This program creates a specific directory structure based upon the language name given in the SQL Setup application:

   Mssql\Locales\<Language> (for example, Mssql\Locales\German) 

The SQL Setup program:
  1. Adds a row in the syslanguages table.


  2. Adds one row for each error message in the sysmessages table.


After the installation there will be one row in the sysmessages table for each message in each language.

There is a unique key, langid, to identify the language. The default value of langid is NULL. The default language depends on the version of SQL Server you installed first. If you install a us_english server, the default language will be us_english. For a localized server, the default language will be the native localized language, and us_english will be a foreign language, if installed. To change the default language, set the default language parameter to the desired langid.

There are also several other factors you should be aware of:

Additional Information

To install an additional language, you have to get the international support files: Common.loc and Server.loc for each language you want. These files come with localized versions of SQL Server. They are available on the International Pack compact discs from MSDN. You can also order the localized versions of SQL Server from retailers who handle these versions.



The Common.loc file contains information about the different system variables, as shown by the following example:

[file format]
version=4.2          ; first international release
list_separator=,  ; commas will separate the members
escape=\             ; backslash is the escape symbol

[language]
language=german

[datetime]
months= Januar,Februar,Maerz,April,...
shortmonths= Jan,Feb,Maer,Apr,Mai....
days= Montag,Dienstag,Mittwoch,Donnerstag...
firstday = 1            ; Monday is the first day of the German week.
dateformat=dmy
timeformat=24 

The Server.loc file contains the localized error messages from SQL Server, as shown by the following example:

Error = Release, Description

21  = 4.2, "VORSICHT - Schwerer Fehler %1! aufgetreten bei %2!.
Bitte notieren Sie Fehler und Uhrzeit, und informieren Sie Ihren
Systemadministrator."
101  = 4.2, "Zeile %1!: SQL Syntaxfehler." 

When a new login is added to SQL Server, the default language for that user can be specified. This setting determines in what language messages (localized or us_english) are sent to the client.

If you add custom messages to the sysmessages table by means of the sp_addmessage stored procedure, be sure to add a message in the localized language and in us_english in case the user's default language setting is null (assuming the initial default is us_english).

The us_english message has the conversion formats embedded in the message. The localized messages have the parameter number (corresponding to the same parameter in the us_english message) in the message. The format specifier is taken from the us_english message with the same error number. The following is an example of an error message in us_english and its corresponding interpretation in localized French:


   // us_english message
   There is already an index on table '%.*s' named '%.*s'

   // Localized message
   n index appel[ASCII 233] '%2' existe d[ASCII 233]j[ASCII 224] sur la    table '%1' 
Instlang.sql

In the Mssql\Install subdirectory you will find the Instlang.sql file. This script is used to install localized language versions of the months of the year and their abbreviations, days of the week, details regarding date formats (for example, ymd or dmy), and what is considered the first day of the week.

This script is run separately from the Langinst.exe file that is run from SQL Setup. It only needs to be run once. The languages installed depend on the character set ID obtained from the syscharsets and sysconfigures table. This character set ID is not changed by the addition of another language; it remains the one chosen during initial SQL Server installation.


Keywords          : kbenv kbsetup SSrvGen SSrvInst 
Version           : winnt:6.0,6.5
Platform          : winnt 
Issue type        : kbhowto kbinfo 

Last Reviewed: April 15, 1999