[ic] Re: Locale fixes

Toni Mueller interchange-users@icdevgroup.org
Sat Jan 25 12:49:01 2003


Hi Mike,

On Sat, Jan 25, 2003 at 12:10:29PM -0500, Mike Heins wrote:
> > so I should get some current documentation first in order to do the
> > right thing...
> It is documented in ictags for the [currency ...] tag, and has been
> for years.

ok, so I've managed to overlook that, too, like the one below.

> 	DefaultLocale a_A

That's what I was after.

> > and list the other locales that are present.
> This I don't understand.

My impression is that it is insufficient to just say [... locale=...]
on a random page, but that it is also required to tell Interchange
which locales are going to be used via eg. the Locale statements in
catalog.cfg. But since you managed to point out two oversights on my
behalf in one message, I probably need to retract that idea and check
again before making any claims :-|

> > I found that using setlocale doesn't affect the result anymore
> > when I write [currency locale=...] in the pages.
> This I don't understand either.

Using the code

[item-price]<br>
[currency locale=de_DE@euro]
[item-price noformat]
[/currency]

should display the price in the default locale (first occurrance), and
the specified locale (second occurrance). I've tried to say various
incantations of [setlocale] in front of the first [item-price], but
could not see any effect. Ie, I changed PriceDivide for fr_FR@euro to
.8, restarted Interchange and still found the price being the same for
both fr_FR@euro and de_DE@euro when saying:

[setlocale fr_FR@euro]
[item-price]<br>
[currency locale=de_DE@euro]
[item-price noformat]
[/currency]

Saying [currency locale=fr_FR@euro][item-price noformat][/currency]
works fine, so I'll stick with that.

> Actually, this is there for Salestax "multi" mode, but not to pass a raw
> number to:
>         [salestax country=DE locale=de_DE]

Ok :-) I'll check this out!

> It would honor tax_category, etc, and follow it down if you had differing
> taxes based on state and province.

Calculating the right item price and sales tax is a bit complicated
(not due to Interchange, but due to real-life).


Thank you!

Best,
--Toni++