[ic] set locale from URL?

Peter peter at pajamian.dhs.org
Wed Aug 3 15:27:58 UTC 2011


On 04/08/11 02:57, DB wrote:
> Hi - is there a way to set the locale by modifying the URL of a page?
> 
> For example:
> http://domain.com/page.html?locale=something

Sure, you can use an AutoLoad to read in the locale from the CGI
variable and pass the value to the setlocale tag.  Something like:

AutoLoad <<EOA
[calcn]
	return unless $CGI->{locale};
	$Tag->setlocale($CGI->{locale});
	return;
[/calcn]
EOA



Peter



More information about the interchange-users mailing list