Languages in SQL Server


The session language determines the datetime formats and system messages of the SQL Server environment. There are various ways to get the language setting on the current environment. We can also set the new language for the session.

In this blog post I will show you various SQL commands that are used to get and set the language settings.

1. @@LangID returns the local language identifier (ID) of the language that is currently being used in SQL Server.

Select @@LangID

pic1

2. @@Language returns the name of the language currently being used in SQL Server.

Select @@Language

pic23. sys.syslanguages is system view. It lists the SQL Server languages name and its settings.

select *  from sys.syslanguages

pic34. Set Language is used to specifies the language environment for the session.

set Language  N’magyar’
select 1/0

Set Language English
Select 1/0

pic45. sp_helplanguage returns information about specific or all language.

sp_helplanguage ‘French’

pic5If you execute this stored procedure without arguments it will list information about all languages.

These commands are very helpful to run an application with different language settings.

One thought on “Languages in SQL Server

Leave a comment