We can set a session’s language With SET LANGUAGE Command. This command affects the system datetime format and system messages.
If you want to learn the session’s language, you can do this with @@LANGUAGE function.
Example:
We set the language as English, then we get the language name and current month name in the First Part.
We repeat the same process for French in the Second Part.
Finally we get the information about all languages with sys.syslanguages.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | --First Part SET LANGUAGE us_english; GO SELECT @@LANGUAGE AS 'Language Name'; GO SELECT DATENAME(month, GETDATE()) AS 'Month Name'; GO --Second Part SET LANGUAGE Français; GO SELECT @@LANGUAGE AS 'Language Name'; GO SELECT DATENAME(month, GETDATE()) AS 'Month Name'; GO --You can learn all language informations as follows. SELECT * from sys.syslanguages |