[ic] I would need some ideas in how to accomplish this multilingual project

Stefan Hornburg Racke interchange-users@interchange.redhat.com
Tue May 7 07:44:01 2002


Rene Hertell <rene@hertell.com> writes:


[...]

> 
> > >   www.site.com/[L]news[/L]/[L]latest[/L]
> > >   (what I mean with the [L]-tags is that these parts of the URL
> > should be in
> > > respective language)
> >
> > Can easily be done with an ActionMap, e.g.:
> >
> > ActionMap Catalog <<EOR
> > sub {
> > 	my ($action, $class, $what, $spec) = split ('/', shift);
> >
> > 	$CGI->{mv_like_field} = 'category';
> >
> > 	$class = 'CDROM' if $class eq 'DVD';
> >
> > 	if ($class eq 'CDROM' || $class eq 'Video') {
> > 		if ($what eq 'Producer') {
> > 			$CGI->{mv_like_field} = 'producer';
> > 		} elsif ($what eq 'Star') {
> > 			$CGI->{mv_like_field} = 'category3';
> > 		}
> > 	} else {
> > 		# other categories have only one level of qualification
> > 		$spec = $what;
> > 		$CGI->{mv_like_field} = 'category';
> > 		$class = 'Novelty' if $class eq 'Novelties';
> > 	}
> >
> > 	$CGI->{mv_todo} = 'search';
> > 	$CGI->{mv_nextpage} = 'results_new';
> > 	$CGI->{mv_profile} = 'catalog';
> > 	$CGI->{mv_coordinate} = 1;
> > 	$CGI->{mv_search_field} = 'class';
> > 	$CGI->{mv_searchspec} = "$class";
> >
> > 	$CGI->{mv_like_spec} = "%$spec";
> > 	$CGI->{mv_column_op} = "eq";
> > 	$CGI->{banner_title} = $spec;
> >
> > 	$Tag->update('process');
> > 	return 1;
> > }
> > EOR
> 
> Could you please give me a small example how this ActionMap works (how to
> call it, what should I do to configure it etc).. This would save me a lot of
> hair ;)

Calling it is simple:

<a href="[area href="/Catalog/DVD/Star/Rene Hertell"]">Rene Hertell</a>

Ciao
        Racke

-- 
Think of it !

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