Querying Global and Local Description
In the standard client functionality, the LanguageNumber parameter determines whether the global or local descriptions will be used but the value of the LanguageNumber itself (for example, which language is configured for the user) has no effect on the selection. If the LanguageSetting site parameter is different than the user's LanguageSetting parameter, then the user will see the global descriptions, is there are any. If there are no global descriptions, then the user will see the local descriptions. If the LanguageSetting site parameter is the same as the user's LanguageSetting parameter, then the user will see the local descriptions.
For example,
DECLARE @SiteLanguageId INT, @UserLanguageId INT;
SELECT @SiteLanguageId=CONVERT(INT, VALUE)
FROM Site_Parameters
WHERE Parm_Id=8;
SELECT @UserLanguageId=COALESCE(COVERT(INT, Value), @SiteLanguageId)
FROM User_Parameters
WHERE Parm_Id=8 AND User_Id=1;
SELECT
CASE
WHEN @UserLanguageId<>@SiteLanguageId OR @UserLanguageId IS NULL
THEN COALESCE(Var_Desc_Global, Var_Desc_Local)
END
FROM Variables
WHERE Var_Id-50;
SchemaName | TableName | ColumnName |
---|---|---|
dbo | Characteristic_Groups | Characteristic_Grp_Desc_Global |
dbo | Characteristics | Char_Desc_Global |
dbo | Departments_Base | Dept_Desc_Global |
dbo | Event_Reason_Catagories | ERC_Desc_Global |
dbo | Event_Reason_Level_Headers | Level_Name_Global |
dbo | Event_Reason_Tree | Tree_Name_Global |
dbo | Event_Reasons | Event_Reason_Name_Global |
dbo | Prod_Lines_Base | PL_Desc_Global |
dbo | Prod_Units_Base | PU_Desc_Global |
dbo | Product_Family | Product_Family_Desc_Global |
dbo | Product_Groups | Product_Grp_Desc_Global |
dbo | Product_Properties | Prop_Desc_Global |
dbo | Production_Status | ProdStatus_Desc_Global |
dbo | Products_Base | Prod_Desc_Global |
dbo | PU_Groups | PUG_Desc_Global |
dbo | Reason_Shortcuts | Shortcut_Name_Global |
dbo | Sheet_Groups | Sheet_Group_Desc_Global |
dbo | Sheets | Sheet_Desc_Global |
dbo | Specifications | Spec_Desc_Global |
dbo | Timed_Event_Fault | TEFault_Name_Global |
dbo | Timed_Event_Status | TEStatus_Name_Global |
dbo | Variables_Base | Var_Desc_Global |
dbo | View_Groups | View_Group_Desc_Global |
dbo | Views | View_Desc_Global |
dbo | Waste_Event_Fault | WEFault_Name_Global |
dbo | Waste_Event_Meas | WEMT_Name_Global |
dbo | Waste_Event_Type | WET_Name_Global |