Actualizar el DateTimePicker en funcion del idioma

20/06/2006 - 12:14 por mafraeb | Informe spam
Hola a todos

Sabe alguien como se hace para que cuando configuro un idioma en mi aplicación

System.Threading.Thread.CurrentThread.CurrentCulture = "es-ES"
System.Threading.Thread.CurrentThread.CurrentUICulture = "es-ES"

¿Los controles DateTimePicker aparezcan en este idioma

No consigo hacerlo y esto me causa problemas ya que al hacer databindings se producen errores en los formatos de las fechas

Gracia

mafraeb

Ver este tema: http://www.softwaremix.net/viewtopic-525864.htm

Enviado desde http://www.softwaremix.net

Preguntas similare

Leer las respuestas

#1 Saul Muñoz (DsK)
20/06/2006 - 23:53 | Informe spam
Que tal mafraeb intenté esto y creo que funciono al menos a nivel de los
mensajes
si te fijas cambia el formato en el que manda los mensajes del message box
ojala te sirva, saludos.

private void button1_Click(object sender, System.EventArgs e)
{
// Creates and initializes a CultureInfo.

CultureInfo myCI = new CultureInfo("es-MX", false);

// Clones myCI and modifies the DTFI and NFI instances associated with
the clone.
CultureInfo myCIclone = (CultureInfo) myCI.Clone();
myCIclone.DateTimeFormat.AMDesignator = "a.m.";
myCIclone.DateTimeFormat.DateSeparator = "/";
myCIclone.NumberFormat.CurrencySymbol = "$";
myCIclone.NumberFormat.NumberDecimalDigits = 4;

System.Threading.Thread.CurrentThread.CurrentCulture = myCI;
System.Threading.Thread.CurrentThread.CurrentUICulture = myCI;
}

private void button2_Click(object sender, System.EventArgs e)
{
CultureInfo myCI = new CultureInfo("en-US", false);

// Clones myCI and modifies the DTFI and NFI instances associated with
the clone.
CultureInfo myCIclone = (CultureInfo) myCI.Clone();
myCIclone.DateTimeFormat.AMDesignator = "a.m.";
myCIclone.DateTimeFormat.DateSeparator = "-";
myCIclone.NumberFormat.CurrencySymbol = "USD";
myCIclone.NumberFormat.NumberDecimalDigits = 4;

System.Threading.Thread.CurrentThread.CurrentCulture = myCI;
System.Threading.Thread.CurrentThread.CurrentUICulture = myCI;
}

private void button3_Click(object sender, System.EventArgs e)
{
MessageBox.Show(dtpTest.Value.ToString());
}

"mafraeb" escribió:


Hola a todos.

Sabe alguien como se hace para que cuando configuro un idioma en mi aplicación:

System.Threading.Thread.CurrentThread.CurrentCulture = "es-ES";
System.Threading.Thread.CurrentThread.CurrentUICulture = "es-ES";

¿Los controles DateTimePicker aparezcan en este idioma?

No consigo hacerlo y esto me causa problemas ya que al hacer databindings se producen errores en los formatos de las fechas.

Gracias


mafraeb


Ver este tema: http://www.softwaremix.net/viewtopic-525864.html

Enviado desde http://www.softwaremix.net



email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida