c# - Currency CultureInfo -


I need to display a particular currency in a culture, we are currently only supporting English-speaking counters , But it can spread to other countries. We are implementing it quickly so I need a way to display a universal currency format for time as long as I can implement a specific culture.

Does anyone know the best way to do this? For example, "N-GB" which is the "Thread" for "Welsh - Great Brittany",

English-Great Britain "or" Sai-GB "(the first 2 letters represent the second 2 languages ​​of the country) for a culture infographic feature attached. So when you are calling

  double amount = 2.00; Zodiac. Toasting ("C") // Without a culture argument you are actually passing culture information  

Therefore, to add a specific culture to a string, you will need a new supply Have to do CultureInfo and add it as a second argument to ToString:

  CultureInfo ci = new CultureInfo ("en-GB"); Zodiac. Toasting ("c", ci);  

Expand the following line in web.config to change the application

  & lt; Globalization uiCulture = "en" culture = "en-GB" />  

Or if you want it per page basis, the following line

  & lt;% @ page = "N" culture = "N-GB"%>  

Or change the culture on the implemented thread

  CultureInfo ci = new CultureInfo ("en-GB"); System.Threading.Thread.CurrentThread.CurrentCulture = ci;  

The international mode of display currency (U + 00A4) (as in the context of CLR via C #, I have not seen it elsewhere) which should be displayed using Could. ToString "C", Culture Info. Inventive culture) which displays a little star item which I do not think anybody will recognize.

Also, please remember that any of these currency is not around the convertible problem which needs to be displayed, which converts directly across the value for another currency value for the price. You better be able to display in US Dollars or UK pounds until you can prepare the best way to make your application local.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -