[interchange-i18n] Re: [interchange-core] $Vend::Flypart / $Vend::FinalPath

Stefan Hornburg Racke racke at linuxia.de
Sun May 12 05:47:44 UTC 2002


Frederic Steinfels <fredo at dvdupgrades.ch> writes:

> Hi
> 
> I made a little status bar for selecting currencies, vat, locale and login /
> password that is available on all pages.

I'm working on a similar problem right now (see http://shop.boxmover.ch/).
For now I came up with the following usertag to solve this problem:

UserTag currencylink Routine <<EOR
sub {
	my ($locale, $alt, $picname, $page, $url);

	if ($Scratch->{mv_currency} eq 'eur_EUR') {
		$locale = 'de_CH';
		$alt = 'Preise in CHF anzeigen';		
		$picname = 'eurochf';
	} else {
		$locale = 'eur_EUR';
		$alt = 'Preise in EURO anzeigen';
		$picname = 'chfeuro';
	}
	
	$page = $Tag->var('MV_PAGE', 1);

	# check for special handling
	if ($page eq 'results') {
		# search results
		$page = $Session->{last_search};
	} elsif ($page eq $Config->{Special}->{flypage}) {
		# flypage
		$page = $Session->{last_url};
		$page =~ s%^/%%;
		$page =~ s%^process/locale/.*/page/%%;
	}

	$url = $Tag->area({href=>"process/locale/de_CH/currency/$locale/page/$page"});

	qq{<a href="$url"><img alt="$alt" border="0" src="$Variable->{THEME_IMG_DIR}$picname.gif"></a>};
}
EOR

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