By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,908 Members | 2,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,908 IT Pros & Developers. It's quick & easy.

DateTimePicker - Howto set the language

P: n/a
Hi,

I have an application that enables the user to switch between (so far) 2
different languages.

Now I need to display a datetimepicker. How can I switch / control the
language the datetimepicker appears?

I tried doing this to set it to english, but it would still display the
control using the german language:
System.Threading.Thread.CurrentThread.CurrentUICul ture =
System.Globalization.CultureInfo.GetCultureInfo("e n-GB")

Thank you very much,

Josef
Mar 1 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Josef,

"Josef Brunner" <jo**@newsgroups.nospam> schrieb:
I have an application that enables the user to switch between (so far) 2
different languages.

Now I need to display a datetimepicker. How can I switch / control the
language the datetimepicker appears?

I tried doing this to set it to english, but it would still display the
control using the german language:
System.Threading.Thread.CurrentThread.CurrentUICul ture =
System.Globalization.CultureInfo.GetCultureInfo("e n-GB")


I assume this needs to be done prior to instantiating the form. However, I
am not sure if it will work on non-MUI versions of Windows at all.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Mar 1 '06 #2

P: n/a
Hi Herfried,

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
I assume this needs to be done prior to instantiating the form. However,
I am not sure if it will work on non-MUI versions of Windows at all.


I tried to chang the Culture before instantiating the form...still no luck.
I guess I have a non-MUI version of Win XP...hhmmm

Thanks anyway,
J
Mar 1 '06 #3

P: n/a
Josef,

I never succeeded in any control or error message to show it in another
culture than the installed OS or/and Net
(Not so strange because in that part is the text that is needed).

(There is not even a Net version 2.0 in most languages, at the moment there
are only something as 8 so by instance we in Belgium and Holland have to do
with texts like "There is a fout geconstateerd in" it is not as bad as this
however I have sometimes that idea ).

:-)

http://www.microsoft.com/downloads/d...DisplayLang=en

Cor

"Josef Brunner" <jo**@newsgroups.nospam> schreef in bericht
news:uS**************@tk2msftngp13.phx.gbl...
Hi Herfried,

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im
Newsbeitrag
I assume this needs to be done prior to instantiating the form. However,
I am not sure if it will work on non-MUI versions of Windows at all.


I tried to chang the Culture before instantiating the form...still no
luck. I guess I have a non-MUI version of Win XP...hhmmm

Thanks anyway,
J

Mar 1 '06 #4

P: n/a
Cor,

"Cor Ligthert [MVP]" <no************@planet.nl> schrieb im Newsbeitrag
news:Ot**************@TK2MSFTNGP14.phx.gbl...
I never succeeded in any control or error message to show it in another
culture than the installed OS or/and Net


:)
Thanks for the info. To solve this, I guess I will have the user input the
date into a TextBox and then I'll try to use the DateTime.TryParse function
to validate whether the given string is a valid date...

Joe
Mar 1 '06 #5

P: n/a
Hi Joe,

As a workaround, you can install Multilanguage Pack firstly and then choose
the language in menus and dialogs in "Regional and Language Options". This
will make the UI display the relevant language.

I hope this information is also helpful for you. Thanks and have a nice day!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
--------------------
From: "Josef Brunner" <jo**@newsgroups.nospam>
References: <eq**************@tk2msftngp13.phx.gbl> <eD*************@TK2MSFTNGP12.phx.gbl>
<uS**************@tk2msftngp13.phx.gbl>
<Ot**************@TK2MSFTNGP14.phx.gbl>Subject: Re: DateTimePicker - Howto set the language
Date: Wed, 1 Mar 2006 14:37:44 +0100
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <eg**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: host-62-245-200-170.customer.m-online.net 62.245.200.170
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:320016
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Cor,

"Cor Ligthert [MVP]" <no************@planet.nl> schrieb im Newsbeitrag
news:Ot**************@TK2MSFTNGP14.phx.gbl...
I never succeeded in any control or error message to show it in another
culture than the installed OS or/and Net
:)
Thanks for the info. To solve this, I guess I will have the user input the
date into a TextBox and then I'll try to use the DateTime.TryParse

functionto validate whether the given string is a valid date...

Joe


Mar 2 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.