c# - format currency in specific way for only one culture -


i working on multi lingual application shows product prices in different currencies. use .net library format currencies based upon culture eg.

cultureinfo current = cultureinfo.currentculture;         return value.value.tostring("c", current); 

a russian client not happy how displays example want 100 руб. showing , not 100,00 р @ moment.

is there easy way modify how price string generated without affecting other conversions culture currency?

you can use custom price format cultures. example: if have culture table in db. should add custompriceformat column default value "{0:c}". in case can change price formats of cultures. can use this:

var pricestring = string.format(currentculture.custompriceformat, d); 

for russian culture custompriceformat "{0:n} руб".


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -