Querying Language Prompts and Overrides
The default language values stored in the Language_Data can be overridden via the Plant Applications Administrator.

The override value is stored in the Language_Data table in an additional record but the Language_Id is set to a negative value instead (for example, Language_Id = 2 becomes Language_Id = -2). As such, to retrieve the value for a particular prompt, 2 records must be selected.
For example,
SELECT coalesce(ldo.Prompt_String, lds.Prompt_String)
FROM Language_Data lds
LEFT JOIN Language_Data ldo ON ldo.Language_Id = (-lds.Language_Id)
AND ldo.Prompt_Number = lds.Prompt_Number
WHERE lds.Language_Id = 2 -- French
AND lds.Prompt_Number = 30001
Additional records can be added to both the Languages table and Language_Data tables to support new languages and/or custom reports. For the Languages table, new records should start with a Language_Id > 5000 while new records in the Language_Data table should start with a Prompt_Number > 500000.