Home All Groups Group Topic Archive Search About

DateTimePicker - Howto set the language

Author
1 Mar 2006 12:00 PM
Josef Brunner
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.CurrentUICulture =
System.Globalization.CultureInfo.GetCultureInfo("en-GB")

Thank you very much,

Josef

Author
1 Mar 2006 12:37 PM
Herfried K. Wagner [MVP]
Josef,

"Josef Brunner" <joey@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.CurrentUICulture =
> System.Globalization.CultureInfo.GetCultureInfo("en-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/>
Author
1 Mar 2006 12:46 PM
Josef Brunner
Hi Herfried,

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@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
Author
1 Mar 2006 1:26 PM
Cor Ligthert [MVP]
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/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en

Cor

Show quoteHide quote
"Josef Brunner" <joey@newsgroups.nospam> schreef in bericht
news:uSp$04SPGHA.2888@tk2msftngp13.phx.gbl...
> Hi Herfried,
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@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
>
Author
1 Mar 2006 1:37 PM
Josef Brunner
Cor,

"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schrieb im Newsbeitrag
news:OtjfMOTPGHA.3984@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
Author
2 Mar 2006 8:17 AM
TerryFei
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" <joey@newsgroups.nospam>
>References: <eqzO0eSPGHA.3***@tk2msftngp13.phx.gbl>
<eDtJtzSPGHA.***@TK2MSFTNGP12.phx.gbl>
<uSp$04SPGHA.2***@tk2msftngp13.phx.gbl>
<OtjfMOTPGHA.3***@TK2MSFTNGP14.phx.gbl>
Show quoteHide quote
>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: <egTbWVTPGHA.1***@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!TK2MSFTNGP09.phx.gbl
>Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.vb:320016
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb
>
>Cor,
>
>"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schrieb im Newsbeitrag
>news:OtjfMOTPGHA.3984@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
>
>
>