[ic] Re: Locale fixes
Mike Heins
interchange-users@icdevgroup.org
Sat Jan 25 14:53:01 2003
Quoting Toni Mueller (support-ic@oeko.net):
>
> 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.
I suppose we could try and retrieve arbitrary locales at runtime
via localeconv(3); I had never thought of that.
> 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).
Nope. You are missing the behavior of [item-price ...]. It is a sub-tag,
which is really part of the loop it is in. Read ictags and look for
"Looping tags and sub-tags".
If you want that behavior, you would need:
[price code="[item-code]"]<br>
[currency locale=de_DE@euro]
[price code="[item-code]" noformat=1]
[/currency]
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
In character, in manners, in style, in all things, the supreme excellence
is simplicity. -- Longfellow