Solved

DateTimePicker control translation

Posted on 1998-09-09
11
367 Views
Last Modified: 2013-11-20
Any idea about how, if it is possible at all, to make the DateTimePicker control display the Days of the week and its Title in French? This control is part of Microsoft's Common control library.
0
Comment
Question by:maries032698
11 Comments
 
LVL 7

Expert Comment

by:psdavis
ID: 1321982
Have you tried using the SetLocale features available to Win32?  I haven't tried them with the DateTimePicker, but I would assume that changing your locale to France would automatically update the date controls to display the month/day in the appropriate language.

Phillip

0
 
LVL 7

Expert Comment

by:psdavis
ID: 1321983
Maries,

Do you need more info on SetLocale?  There is a Microsoft website 'Going Global' that has some papers on locale information.

Phillip
0
 
LVL 2

Expert Comment

by:duneram
ID: 1321984
I think it may be a little more than that.   I worked on a project where we did a dutch & french version of it.  The answer may be as simple as installing a 'french' version of windows on your test machine.  The french localized files and data will be already in the dll's shipped with that version of windows.


0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 1

Expert Comment

by:plebel
ID: 1321985
I don't know that control, but if it is well done, it is suposed to get the date format from the system.  So if you are runing a French System, i think that it is better to use or create an other control.

Otherwise, you need a french version of windows
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1321986
Plebel,

It is bad form to answer a question with the same answer as the comments given previously to the user.  
0
 
LVL 2

Expert Comment

by:duneram
ID: 1321987
Plebel,

What's worse is you start out saying you don't know about the control.  Getting a date from the system isn't the issue its the 'text' on the control.

As for your answer of using 'french' windows, didn't I suggest that (see: Thursday, September 10 1998 - 09:40AM PDT )?


0
 

Author Comment

by:maries032698
ID: 1321988
Thanks for the answers. But the problem is a little more complicated than having the French version of windows installed. The application in question must change languages on the fly from English to French and vice versa thorugh a menu item. So, I am, in fact, wondering if there is any style or way to change the text (title and days of the week) of the control. Or could I import the control into VC++ resource editor and create the french version?

Marie
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1321989
Seriously, have you tried SetLocale?  There's a really good chance that it would work.

Phillip
0
 
LVL 2

Expert Comment

by:duneram
ID: 1321990
In the Windows DDK is the function LoadTable.  Modifying the keyboard driver in the system.ini file, then calling LoadTable will let you at runtime change the keyboard codes from English to French or what ever language you choose to interpret the keyboard codes.

When you do a loadtable, you are changing the behaviour of the keyboard...  

This with SetLocale may prove to be use.

Definitely try the SetLocale first though.


0
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 1321991
LoadTable is completely unrelated to this issue and is not what you want.

What's with the SetLocale() suggestion?  SetLocale() isn't a member of CDateTimeCtrl, and setlocale() only changes the locale used by the C/C++ runtime library; it's guaranteed not to effect a control created by Windows.

Did you guys really mean you wanted to call SetLocaleInfo()? That'll work, if you do it before the dialog is created and the system has the codepage installed. Installing the codepage means that you've got the localized version of the operating system installed (under Windows 95), or that the user has installed the language pack (under Windows 98), or that the user has explicitly installed the codepage (in Windows NT 4.0).

If you can't get the codepage installed, then you need to write a control yourself starting from scratch: the control uses the GetLocaleInfo() call to get the localized strings. It's not designed to make the strings replaceable; you're stewed, if that's what you want.

Maybe restating an answer is bad form, but offering bogus advice is even worse--if you ask me.

B ekiM


0
 
LVL 7

Expert Comment

by:psdavis
ID: 1321992
> Did you guys really mean you wanted to call SetLocaleInfo()?

Yep.  Thanks for the clarification!

Phillip
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ORA-01403: no data found 43 105
Prevent this page from creating additional dialogs. 3 611
sum67 challenge 35 107
Bartender label printing - switch on and off graphics 3 54
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question