[ic] Re: Locale fixes

Mike Heins interchange-users@icdevgroup.org
Fri Jan 24 20:38:01 2003


Quoting Toni Mueller (support-ic@oeko.net):

[snip and re-order]

> One thing that immediately jumps into the face is that PriceDivide
> doesn't seem to have any effect - I've tried other numbers as
> well, without success. Another problem is that the locale settings
> are somehow honored only partially, with the french setting in
> force while trying to display a german price.

With the code you have, you would need to use

	[currency convert=1] .... [/currency]

This is now obviated with [currency locale=sv_SV] ... [/currency], which
forces convert=1.

[snip and re-order]
> In flypage.html (with most of the HTML in between removed):
> 
> [setlocale de_DE@euro]
> x [item-price]
> [setlocale de_DE@euro]
> [currency][calc][item-price noformat]*0.16[/calc][/currency]<br>
> [currency]
>     [calc]
>     [item-price noformat]*1.16
>     [/calc]
> [/currency]
> <br>
> [setlocale fr_FR@euro]
> [currency][calc][item-price noformat]*0.16[/calc][/currency]<br>
> [currency]
>     [calc]
>     [item-price noformat]*1.16
>     [/calc]
> [/currency]
> <br>
> [setlocale sv_SE]
> [currency][calc][item-price noformat]*0.25[/calc][/currency]<br>
> [currency]
>     [calc]
>     [item-price noformat]*1.25
>     [/calc]
> [/currency]
> 

With a patch I put in yesterday, you would say:

	[currency locale=sv_SE][item-price noformat][/currency]

Of course the calc would still need to be in the body for the calculated
values...

No setlocale need be done, and conversion is automatic.

Likewise, I enabled:

	[subtotal locale=sv_SV]
	[salestax locale=sv_SV]
	[shipping locale=sv_SV]
	[handling locale=sv_SV]
	[total-cost locale=sv_SV]

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer