R: Re [ic] Locale question

Stefano Nota interchange-users@lists.akopia.com
Tue Jul 3 12:05:00 2001


Maybe i express myself bad,

In a page i should show 2 currency.
One is euro, always.
The second one is lire or dollars depending on locale setting.

When someone enter, he choose the language and i set currency to eur_EUR
with

	[page process/locale/en_US/currency/eur_EUR/page/index]or
	[page process/locale/it_IT/currency/eur_EUR/page/index].

Euro pricing is shown but  under [item-price], where i've written
[setlocale it_IT]
	[currency convert=1][item-field price][/currency]
[setlocale]

if language is set to it_IT, price is shown as euro pricing, but it is
converted correctly.
Infact i obtain EURO 197.67
		    EURO 351.124,25 (this should be Lit.351.125)

So in the page i should test the language to show also lira or dollars.
Here is what's mean my if construct.

Now i express myself better?

Thanks stefano


-----Messaggio originale-----
Da: interchange-users-admin@developer.akopia.com
[mailto:interchange-users-admin@developer.akopia.com]Per conto di
Joachim Leidinger
Inviato: marted́ 3 luglio 2001 17.37
A: interchange-users@developer.akopia.com
Oggetto: Re: Re [ic] Locale question


Stefano Nota wrote:
>
> --code:
>
> [item-price]<br>
> [if scratch mv_locale eq it_IT]
>         [tmp ita][item-price noformat=1][/tmp]
>         [setlocale it_IT]
>                 [currency convert=1][scratch ita][/currency]

try           [currency][scratch ita][/currency]

>         [setlocale]
> [/if]
> [if scratch mv_locale eq en_US]
>                 [tmp eng][item-price noformat=1][/tmp]
>                 [setlocale en_US][currency]

this [currency] is wrong. Delete it.

>                         [currency convert=1][scratch
eng][/currency][/currency]

Try only [currency][scratch eng][/currency]


>                 [setlocale]
> [/if]

Summary:
Your code make no sense for me. Because if your setting is right, you
dont need the if construct like above.

Try

TEST: The locale is [scratch mv_locale] and the price is [item-price]
<BR>

in your page first and switch the language. It will display the price
and the currecny symbol correctly.
A usefull hint is...install the construct demo in your server too and
see what happen, if you choose another language.
Do you know, how to change the language on the fly?
Switch the language: 	<A HREF="[area
href="process/locale/en_US/page/mypage"]">English</A>&nbsp;
			<A HREF="[area href="process/locale/it_IT/page/mypage"]">Italiano</A>
			<A HREF="[area href="process/locale/eur_EUR/page/mypage"]">Italiano
EURO</A>


> --Locale.TXT
> code            en_US   de_DE  fr_FR  it_IT      eur_EUR spa_SPA
>
> PriceDivide 1.18154 0.5409 0.1632 0.000516457 1 1.18154
>
> currency_symbol $ DM            FF      Lit             EURO
>
> default         0         0       0       0          1         0
> frac_digits 2         2       2     0          2
> mon_decimal_point .   ,      ,      ,          ,
> mon_thousand_sep    . .
> mon_thousands_sep , , . . .
> p_cs_precedes 1   1 1
> p_sep_by_space   1 1 1
>
> --Catalog.cfg
> Locale          eur_EUR LC_CTYPE eur_EUR

I'm missing

Locale     it_IT .....
Locale      en_US .....
and so on... (don't forget to restart the IC Server) ...in your
catalog.cfg.

ciao

Joachim

--
-------------<BPA FreeBsd>----------------------------------------------
Hans-Joachim Leidinger          black point arts Internet Solutions GmbH
email: jojo@blackpoint.de       FAX  : +49 0209-398265
http://www.bpaserver.net
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users