My application supports multi language including English ,Chinese, Hindi Language. I need to display the currency symbol in the textbox based on the culture selected. How can this be done?
Currency Symbol for various languages in .net
Asked Answered
You can create a CultureInfo
object via constructor or CreateSpecificCulture
. Then you can use it's NumberFormat
property and NumberFormatInfo.CurrencySymbol
:
var culture = CultureInfo.CreateSpecificCulture("de-DE"); // german
string currencySymbol = culture.NumberFormat.CurrencySymbol; // €
culture = CultureInfo.CreateSpecificCulture("hi-IN"); // Hindi
currencySymbol = culture.NumberFormat.CurrencySymbol; // ₹
Using RegionInfo.CurrentRegion.ISOCurrencySymbol
NumberFormatInfo nfi = ci.NumberFormat;
nfi.CurrencySymbol
© 2022 - 2024 — McMap. All rights reserved.
$
) for a given culture, the accepted answer only shows how to get the three-character symbol(e.g.USD
) of the current culture/region. – Hokusai