NumberFormatInfo - currency symbol on the left??

G

Guest

Hi,

I've got a web app where i need to show values in specific currencies.

for the session i create a Customised CultureInfo which is derived from the
culture of the browser, for example, french-france (fr-FR)

they display their currencies like 23,22 EUR (symbol)

I have a change currency option on the site that applies a multiplier to
values shown on the site, but when the user changes the currency to say GPB,
i want the currencies to be displayed with the currency sign on the left,
i.e. £23,22 but maintaining the culture decimal and group characters.

My custom CultureInfo has a NumberFormatInfo class, which I change the
currency symbol for; BUT i cannot see how to change the side in which the
symbol is rendered.

e.g.
NumberFormatInfo nfi = (NumberFormatInfo)base.NumberFormat.Clone();
nfi.CurrencySymbol = [myCurrencySign]; // in this case "£"

// what property determines which side the currency sign is shown??
nfi.<Property> = ??

Hope that make sense
 
G

Guest

My custom CultureInfo has a NumberFormatInfo class, which I change the
currency symbol for; BUT i cannot see how to change the side in which the
symbol is rendered.

e.g.
NumberFormatInfo nfi = (NumberFormatInfo)base.NumberFormat.Clone();
nfi.CurrencySymbol = [myCurrencySign]; // in this case "£"

// what property determines which side the currency sign is shown??
nfi.<Property> = ??

Use the CurrencyPositivePattern and CurrencyNegativePattern properties
to decide the position of the currency symbol.
 
G

Guest

thanks mate
sorted now
--
TIA
Sam Martin


Göran Andersson said:
My custom CultureInfo has a NumberFormatInfo class, which I change the
currency symbol for; BUT i cannot see how to change the side in which the
symbol is rendered.

e.g.
NumberFormatInfo nfi = (NumberFormatInfo)base.NumberFormat.Clone();
nfi.CurrencySymbol = [myCurrencySign]; // in this case "£"

// what property determines which side the currency sign is shown??
nfi.<Property> = ??

Use the CurrencyPositivePattern and CurrencyNegativePattern properties
to decide the position of the currency symbol.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top