[interchange-i18n] Product database

Stefan Hornburg Racke racke at linuxia.de
Fri Feb 15 13:40:00 UTC 2002


Francisco Sánchez <lists at e-civitas.com> writes:

> >
> > > No way.  I have search documentation and there is nothing like
> CommentField.
> > > I can only think of using [item-[L]field comment[/L]] in flypage.html.
> >
> > A nicer way of doing this is sth. like this below, but the above method is
> > the fastest one.
> >
> > UserTag language-field Order base field code
> > UserTag language-field Routine <<EOF
> > sub {
> > my ($base, $field, $code) = @_;
> > my $data;
> > my $locale = $Scratch->{mv_locale};
> >
> > if ($locale) {
> > $data = $Tag->data($base,"${field}_$locale",$code);
> > return $data if $data =~ /\S/;
> > }
> > $Tag->data($base,$field,$code);
> > }
> > EOF
> >
> > [language-field products comment [item-code]]
> >
> 
> Thanks again Stefan for the good advice.
> 
> I have come to a new problem that might be solved with something like this:
> 
> DescriptionField is good, but only applies to the [item description] tag.
> 
> Now, for some parts of the shop, the item description is retrieved by
> [item-data products description].  Of course it ignores DescriptionFiled.  I
> have devised to fix this with something like [L][item-data products
> description][/L], and creating [item-data products description_es] in
> es_ES.cfg.  Now, this works for html templantes, but is useless for
> components, where the [L] tag does not work.  I have tried there [msg] and
> [loc], but to no avail, since those tags are parsed after [item-data
> products description], NOT before, as it happens with [L].

In this case the following should work:

[language-field base=products field=description code="[item-data products sku]"]

I discussed this issue with Jon Jensen and I suggested to implement
some kind of overloading for any database accesses. But this will
be a long-term project.

Ciao
        Racke

-- 
Think of it !

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info at cobolt.net; Phone: 0041-1-3884400)



More information about the interchange-i18n mailing list