create table my_messages
(
Constraint_Name varchar2(30) not null,
Actions varchar2(3) not null,
Parent_Child varchar2(1) not null,
Error_Message varchar2(2000)
);
You can also add indexes of course. Your application users must have select privileges to this table, and you should probably also define a public synonym or private synonyms for this table, or provide the schema with the message table property.
For this you would need to create a table with the columns mentioned above + a new language column. Next you should create a view that returns the message records for the appropriate language of the user. Perhaps you have a preferences table for the user, or perhaps you have a package where you can set such a preference in a global variable. This language column or global language variable can be used in the where clause of the view.
The MessageTable property should contain the name of this view.
Originally posted by Marco Kalter: ... or perhaps you have a package where you can set such a preference in a global variable. This language column or global language variable can be used in the where clause of the view.
...
Let me know how I can reference name of global package variable in the view, AFAIK you can only reference functions(standalone and packaged. Seems that Oracle DB shares my opinion:
Code:
create package mumu as
x number :=1;
end;
/
select * from dual where mumu.x=1
ORA-06553: PLS-221: 'X' is not a procedure or is undefined
Code:
create or replace package mumu as
x number :=1;
function fx return number;
end;
Package created
create or replace package body mumu as
function fx return number is
begin
return x;
end;
end;
Package body created
select * from dual where mumu.fx=1
DUMMY
-----
X