[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] UserTag and locale Problem


Quoting Lars Tode:
Hi list,

may be some has an idea or a hint for the following problem.
I still did not get it yet.

A UserTag, lets call it check_basket, should controll some things like
the minimum order value, the maximum order value and other stuff.

If, for example, the total is less then the minimum order value,
check_basket should set the error message "some text" using error:
$Tag->error(
   {
    name  => 'my_error',
    set   => $error_msg
   }
);

$error_msg is set in this way

my $error_msg    =  $Tag->filter(
   {
    'op'  => 'loc html2text vars_and_comments',
    interpolate => 1,
    body  => 'some text'
   },
   ''
);

The locale.txt:
--snip--
code    en_US
some text   Some text [user_tag] again text
--snap--

How about:

locale.txt:
code            en_US
some text       Some text %s again text


# Localize message string
my $param1 = "HERE";
my $msg = errmsg("some text", $param1);

# Set the error
$Tag->error( { name => 'my label', set => $msg });

Should result in:
Some text HERE again text



Best regards,

Ton

--
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    suppressed    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.