尝试使用 (custom numeric formats) 你的情况是:
string frFR = string.Format(new System.Globalization.CultureInfo("fr-FR"),
(new CultureInfo("fr-FR")).NumberFormat.CurrencyPositivePattern % 2 == 0 ?
"{0}{1:#,##0.##}" : "{1:#,##0.##}{0}",
new RegionInfo(new CultureInfo("fr-FR").LCID).CurrencySymbol, price);
string frFR2 = string.Format(new System.Globalization.CultureInfo("fr-FR"),
(new CultureInfo("fr-FR")).NumberFormat.CurrencyPositivePattern % 2 == 0 ?
"{0}{1:#,##0.##}" : "{1:#,##0.##}{0}",
new RegionInfo(new CultureInfo("fr-FR").LCID).CurrencySymbol, price2);
string co = string.Format(new System.Globalization.CultureInfo("es-CO"),
(new CultureInfo("es-CO")).NumberFormat.CurrencyPositivePattern % 2 == 0 ?
"{0}{1:#,##0.##}" : "{1:#,##0.##}{0}",
new RegionInfo(new CultureInfo("es-CO").LCID).CurrencySymbol, price);
string co2 = string.Format(new System.Globalization.CultureInfo("es-CO"),
(new CultureInfo("es-CO")).NumberFormat.CurrencyPositivePattern % 2 == 0 ?
"{0}{1:#,##0.##}" : "{1:#,##0.##}{0}",
new RegionInfo(new CultureInfo("es-CO").LCID).CurrencySymbol, price2);
如果您想要 ISO 标准货币代码而不是符号,请使用 ISOCurrencySymbol 而不是 CurrencySymbol。
这是一种方法
public static string FormatCurrency(decimal amount, string culture,
bool useIsoCurrencySymbol = false)
{
var ci = new CultureInfo(culture);
return string.Format ci,
ci.NumberFormat.CurrencyPositivePattern % 2 == 0 ?
"{0}{1:#,##0.##}" : "{1:#,##0.##}{0}",
useIsoCurrencySymbol?
new RegionInfo(ci.LCID).ISOCurrencySymbol:
new RegionInfo(ci.LCID).CurrencySymbol, amount);
}
注意:“fr-FR”的千位分隔符显然是一个空格,而不是句点或逗号。