Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [TheStone] User Language

Quote Reply
Re: [TheStone] User Language In reply to
I appreciate your help but I still can't get this to work.

I'm generating additional error messages based on the contents of $tags->{msg} as follows -

#Include the current tags
my $tags = GT::Template->tags;
my
$error_msg=$tags->{msg};

my $language_msg = ???????;

if ($error_msg =~ /\b$language_msg\b/) {

#do something

}

#repeat for each error message

What I want to do is check the value (contents) of $tags->{msg} to see if it contains any of the error messages in my language.txt but I don't know how to make the error messages available in my custom perl module and also how to refer to them. So what i need to know is -

1/ What code to add to make the language.txt tags available?

From previous replies it would apear to be -

#Setup the language for GT::SQL.
local $GT::SQL::ERRORS->{ILLEGALVAL} = $self->_language('ADD_ILLEGALVAL');
local $GT::SQL::ERRORS->{UNIQUE} = $self->_language('ADD_UNIQUE');
local $GT::SQL::ERRORS->{NOTNULL} = $self->_language('ADD_NOTNULL');


IS THIS CORRECT?

2/ How to call up or refer to the error messages in my example -

my $language_msg = ???????;

What should the ??????? be ?

Thank you.

Simon.

Subject Author Views Date
Thread User Language jai 3521 Oct 28, 2002, 9:24 PM
Thread Re: [jai] User Language
604 3425 Oct 29, 2002, 10:14 AM
Thread Re: [TheStone] User Language
jai 3419 Oct 29, 2002, 4:04 PM
Thread Re: [jai] User Language
604 3360 Nov 13, 2002, 3:57 PM
Thread Re: [TheStone] User Language
jai 3344 Nov 13, 2002, 9:03 PM
Post Re: [jai] User Language
604 3352 Nov 14, 2002, 9:45 AM