Querying a User’s Language

The default language setting for all users is defined in the Site_Parameters table in the LanguageNumber parameter. The value of the LanguageNumber parameter corresponds to the Language_Id in the Languages table. In addition, the language can be configured for individual users in the User_Parameters table with the same LanguageNumber parameter. This setting defines the language that is shown in the Plant Applications Client, Web Server and Excel Add-In.

For example,


DECLARE	@LanguageId	int 
SELECT @LanguageId = convert(int, Value)
 
FROM Site_Parameters 
WHERE	Parm_Id = 8

SELECT @LanguageId = coalesce(convert(int, Value), @LanguageId) 
FROM User_Parameters
WHERE	      Parm_Id = 8 
              AND User_Id = 1