Hi Jokin. The .NET runtime should show the Euro symbol by default for this
culture. This is stored in the
System.Globalization.NumberFormatInfo.CurrentInfo. CurrencySymbol property.
// begin
using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Threading;
namespace currencyconsole
{
class Program
{
static void Main(string[] args)
{
CultureInfo ci = new CultureInfo("es-ES");
Thread.CurrentThread.CurrentCulture = ci;
decimal d = 12345678.90M;
Console.WriteLine("The currency symbol for {0} is {1}.",
ci.EnglishName, NumberFormatInfo.CurrentInfo.CurrencySymbol);
Console.WriteLine("Example: {0:C}", d);
Console.ReadLine();
}
}
// end
(Note: The Euro symbol won't render correctly by default in a command
prompt, but you can change the codepage to Unicode by typing 'chcp 65001',
then set the font property to Lucida Console.)
Garrett McGowan [MSFT Developer International]
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
Quote:
From: jokin.c (AT) gmail (DOT) com
Newsgroups: microsoft.public.dotnet.internationalization
Subject: cultureinfo currency
Date: 29 Jun 2006 09:08:30 -0700
I don't know if this is the proper group for this question.
Where is the information of the locale infos saved?
I set the cultureinfo to es-Es, and the currency appear as "pesetas",
that is the currency used before the 2000 in spain.
What i have to change to show "€" (euro)
Thanks in advance and excuse my poor english.
Jokin |