473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

DateTimePicker - Howto set the language

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
5 4053
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Angelina | last post by:
Hi, I have got two DateTimePicker's on my form to accept a guest arrival date and departure date.what i want to acheieve is ensure that the DateTimePicker2 (departure) is always greater than...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
0
by: Sumit | last post by:
Hi all, I have a datetimepicker on my windows form. When the user selects it i check whether the date entered is a Sunday or not & if its not a sunday i want that the control remains on the...
4
by: Jacek Jurkowski | last post by:
.... the minimum date of DateTimePicker is 1753-01-01. How to make DateTime to do not show nothing in its text if this date is the value? I have a form with a field LastLogonDate. If user hasn't...
3
by: Reny J Joseph Thuthikattu | last post by:
Hi, If i put a month callender on a asp.net web form and specify the culture on the page directive like '<%@ Page language="c#" Culture="ar-OM"%> it will display the Month callender in arabic. ...
7
by: Clamara | last post by:
When adding a new record from my form, I pre-set my DateTimePicker's value to System.DateTime.Today Since the "Today" value is used most of the time, the user doesn't need to select a date from...
3
by: Charlie | last post by:
In the top portion of the DateTimePicker, where the value of the date is displayed, how can I detect whether the month or day or year is currently focused, or, if ShowCheckBox = True, whether the...
7
by: Pieter | last post by:
Hi, I'm looking for a DateTimePicker that supports 100% databinding (and support null-values)... It's a shame that the normal control doesn't, but when searching on the internet, I didn't find...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.