set system information

My windows is chinese win98, but I want to change the Chinese mode of Date and laugage into English mode when I run the Application. What can I do? Thank you!
Who is Participating?
MadshiConnect With a Mentor Commented:
This is an extract from MSDN, does it help?

"Languages, Locales, and Keyboard Layouts
A language is a natural language, such as English, French, and Japanese. A sublanguange is a variant of a natural language that is spoken in a specific geographical region, such as the English sublanguages spoken in Great Britain and the United States. Win32-based applications use values, called language identifiers, to uniquely identify languages and sublanguages.

Applications typically use locales to set the language in which input and output is processed. Setting the locale for the keyboard, for example, affects the character values generated by the keyboard. Setting the locale for the display or printer affects the glyphs displayed or printed. Applications set the locale for a keyboard by loading and using keyboard layouts. They set the locale for a display or printer by selecting a font that supports the given locale.

A keyboard layout not only specifies the physical position of the keys on the keyboard but also determines the character values generated by pressing those keys. Each layout identifies the current input language and determines which character values are generated by which keys and key combinations.

Every keyboard layout has a corresponding handle that identifies the layout and language. The low word of the handle is a language identifier. The high word is a device handle, specifying the physical layout, or is zero, indicating a default physical layout. The user can associate any input language with a given physical layout. For example, an English-speaking user who very occasionally works in French can set the input language of the keyboard to French without changing the physical layout of the keyboard. This means the user can enter text in French using the familiar English layout.

Applications are generally not expected to manipulate input languages directly. Instead, the user sets up language and layout combinations, then switches among them. When the user clicks into text marked with a different language, the application calls the ActivateKeyboardLayout function to activate the user's default layout for that language. If the user edits text in a language which is not in the active list, the application can call the LoadKeyboardLayout function with the language to get a layout based on that language.

The ActivateKeyboardLayout function sets the input language for the current task. The hkl parameter can be either the handle to the keyboard layout or a zero-extended language identifier. Keyboard layout handles can be obtained from the LoadKeyboardLayout or GetKeyboardLayoutList function. The HKL_NEXT and HKL_PREV values can also be used to select the next or previous keyboard.

The GetKeyboardLayoutName function retrieves the name of the active keyboard layout for the calling thread. If an application creates the active layout using the LoadKeyboardLayout function, GetKeyboardLayoutName retrieves the same string used to create the layout. Otherwise, the string is the primary language identifier corresponding to the locale of the active layout. This means the function may not necessarily differentiate among different layouts with the same primary language, so cannot return specific information about the input language. The GetKeyboardLayout function, however, can be used to determine the input language.

The LoadKeyboardLayout function loads a keyboard layout and makes the layout available to the user. Applications can make the layout immediately active for the current thread by using the KLF_ACTIVATE value. An application can use the KLF_REORDER value to reorder the layouts without also specifying the KLF_ACTIVATE value. Applications should always use the KLF_SUBSTITUTE_OK value when loading keyboard layouts to ensure that the user's preference, if any, is selected.

For multilingual support, the LoadKeyboardLayout function provides the KLF_REPLACELANG and KLF_NOTELLSHELL flags. The KLF_REPLACELANG flag directs the function to replace an existing keyboard layout without changing the language. Attempting to replace an existing layout using the same language identifier but without specifying KLF_REPLACELANG is an error. The KLF_NOTELLSHELL flag prevents the function from notifying the shell when a keyboard layout is added or replaced. This is useful for applications that add multiple layouts in a consecutive series of calls. This flag should be used in all but the last call.

The UnloadKeyboardLayout function is restricted in that it cannot unload the system default input language. This ensures that the user always has one layout available for enter text using the same character set as used by the shell and file system."

Regards, Madshi.
Hi luf!

The text bellow is exactly from Delphi help. By changing that values you can change system settings for your application.

The following are a set of variables used to define the format for numeric or date/time strings:

var CurrencyString: string;
var CurrencyFormat: Byte;
var NegCurrFormat: Byte;
var ThousandSeparator: Char;
var DecimalSeparator: Char;
var CurrencyDecimals: Byte;
var DateSeparator: Char;
var ShortDateFormat: string;
var LongDateFormat: string;
var TimeSeparator: Char;
var TimeAMString: string;
var TimePMString: string;
var ShortTimeFormat: string;

var LongTimeFormat: string;
var ShortMonthNames: array[1..12] of string;
var LongMonthNames: array[1..12] of string;
var ShortDayNames: array[1..7] of string;
var LongDayNames: array[1..7] of string;

var SysLocale: TSysLocale;
var EraNames: array[1..7] of string;
var EraYearOffsets: array[1..7] of Integer;
var TwoDigitYearCenturyWindow: Word = 50;

var TListSeparator: Char;
lufAuthor Commented:
Dear Ituqay,
How can I change the laugage of system?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Hi luf.

It's not possible for me to manipulate with languages. (I have only one installed on my computer). Please, look at SysLocale variable. To detect language, your application use PriLangID. Try to change it:


Text bellow is from Delphi help again.
type TSysLocale = packed record

  DefaultLCID: LCID;
  PriLangID: LANGID;
  SubLangID: LANGID;
  FarEast: Boolean;
  MiddleEast: Boolean;



The TSysLocale type represents a Windows locale. The locale determines how dates and times are formatted, how items are alphabetically sorted, and how strings are compared.

The DefaultLCID field represents the system Windows locale identifier. This is a 32-bit value that specifies a default sort order and a default language identifier.

The PirLangID field specifies the primary type of the language identifier. This is one of the Windows constants that identify a language group such as LANG_ENGLISH or LANG_FRENCH.

The SubLangID field specifies the subtype of the language identifier. This is one of the Windows constants that identify a language subgroup such as SUBLANG_ENGLISH_US or SUBLANG_FRENCH_CANADIAN.

FarEast indicates whether the locale represents an Asian locale.

MiddleEast indicates whether the local represents a Middle Eastern locale.

I hope it help You.
lufAuthor Commented:
Thank you! Could you give me a example for change laugage? Because I need show the mode in USA, not Chinese mode, but my operation system is Chinese win98.
lufAuthor Commented:
Change the laugage only in my App not at all.
Ehmmm... Are you talking to me? Do you still need an example? For what? For using LoadKeyboardLayout? Or are you talking to ITugay?
lufAuthor Commented:
How to change the laugage in your way? Please give me some code. Thank you!
I can't test it because I have only one language installed on my system, but it should be something like this:

LoadKeyboardLayout("00000409", KLF_ACTIVATE);
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.