LANGUAGE Statement in RC Differs in Windows NT from Windows 95ID: Q140763
|
The LANGUAGE statement in resource files sets the language for all
resources up to the next LANGUAGE statement or to the end of the file. When
the LANGUAGE statement appears before the BEGIN in an ACCELERATORS, DIALOG,
MENU, RCDATA, or STRINGTABLE resource definition, the specified language
applies only to that resource.
The general syntax for the language statement is:
LANGUAGE language, sublanguage
In Windows NT, several language versions of the same resource (with the
same ID and type) can be loaded at the same time. The programmer can decide
which language version of the resource to use dynamicaly by calling
SetThreadLocale(). For example, the following is in a RC file:
ABOUTBOX DIALOG DISCARDABLE 52, 57, 144, 45
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
STYLE DS_MODALFRAME | WS_CAPTION
FONT 8, "System"
BEGIN
CTEXT "Microsoft(r)",-1,0,5,144,8
CTEXT "German menu Example",-1,0,14,144,8
ICON IDR_MENU,-1,10,10,18,20
DEFPUSHBUTTON "OK",IDOK,53,25,32,14,WS_GROUP
END
ABOUTBOX DIALOG DISCARDABLE 52, 57, 144, 45
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STYLE DS_MODALFRAME | WS_CAPTION
FONT 8, "System"
BEGIN
CTEXT "Microsoft(r)",-1,0,5,144,8
CTEXT "Menu Example",-1,0,14,144,8
ICON IDR_MENU,-1,10,10,18,20
DEFPUSHBUTTON "OK",IDOK,53,25,32,14,WS_GROUP
END
Additional query words: 4.00 1.30 setlocale kbinf
Keywords : kbIntlDev
Version :
Platform : NT WINDOWS
Issue type :
Last Reviewed: March 5, 1999