NumberFormatInfo - currency symbol on the left??

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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.
 
Back
Top