0

I am working on a multi lingual application that shows product prices in different currencies. I use the .net library to format currencies based upon culture eg.

CultureInfo current = CultureInfo.CurrentCulture;
        return value.Value.ToString("C", current);

A Russian client is not happy with how this displays so for example they want 100 руб. showing and not 100,00 р as at the moment.

Is there an easy way to modify how the price string is generated without affecting other conversions to their culture currency?

amateur
  • 43,371
  • 65
  • 192
  • 320

1 Answers1

0

You can use custom price format for some cultures. For example: If you have Culture table in your db. You should add CustomPriceFormat column with default value "{0:C}". In this case your can change some price formats of cultures. Then you can use like this:

var priceString = string.Format(currentCulture.CustomPriceFormat, d);

For Russian culture CustomPriceFormat is "{0:N} руб".

Khurshid
  • 954
  • 7
  • 19