R: R: R: R: [ic] help with locale please

Stefano Nota interchange-users@lists.akopia.com
Tue May 15 02:47:00 2001


Ok it works, now i understand,

thanks a lot  Racke
				stefano

-----Messaggio originale-----
Da: interchange-users-admin@developer.akopia.com
[mailto:interchange-users-admin@developer.akopia.com]Per conto di Stefan
Hornburg (Racke)
Inviato: luned́ 14 maggio 2001 16.49
A: interchange-users@developer.akopia.com
Oggetto: Re: R: R: R: [ic] help with locale please


"Stefano Nota" <stefano@register.it> writes:

> Something like this is rigth?
>
> UserTag language-field Order field code
> UserTag language-field Routine <<EOF
> sub {
> 	my ($comment_it_IT, $code) = @_;
> 	my $data;
> 	my $locale = $Scratch->{mv_locale};
>
> 	if ($locale) {
> 		$data = $Tag->data('products',"${comment_it_IT}_$locale",$code);
> 		return $data if $data =~ /\S/;
> 	}
> 	$Tag->data('products',$comment_it_IT,$code);
> }
> EOF
>
> If i've done errors, could you correct it please?
> It's not so simple, i'm not so expert.

No, I think this leads into the wrong direction. Lets start with the
database setup, then we talk about applying this function.

I assume you have something like that as products database:

sku    comment          comment_it_IT           whatever whatever_it_IT
11111  English Comment  Commentare Italiano     Bye      Ciao

Now, if you use my original function and

[language-field comment [item-code]]

resp.

[language-field whatever [item-code]]

You get the text of comment_it_IT resp. whatever_it_IT if the selected
language is it_IT, otherwise the text from comment resp. whatever.

Bye
        Racke

--
Master of Swiss Web 2001: http://www.zweifel.ch/

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users