I am writing a Delphi program which will use Hindi. I use Soluling which produce .RC files with constant LANG_HINDI.
But it is not recognized as a valid constant.
I try to search all source files including Windows.pas, but cannot find its definition. Also with Visual Studio source codes, there is also no such a constant.
Where is LANG_HINDI defined?
2
Answers
The Soluling supports told me the contants come from the Windows Kit header files, like below:
So I need to import these constants to Delphi manually.
The constant LANG_HINDI is not a standard constant in Delphi or the Windows API. You are trying to use it for localization purposes, but it’s not a recognized constant for specifying the Hindi language.
In Delphi and the Windows API, language identifiers are typically represented using hexadecimal values defined in the Winapi.Windows unit. For Hindi, you would use the language identifier HINDI_LANGID, which is defined as follows:
const
HINDI_LANGID = $39; // Hindi
You can use this constant in your Delphi program to specify the Hindi language. Here’s an example of how you might use it
SetThreadLocale(HINDI_LANGID);
Make sure to include the Winapi—Windows unit in your Delphi project to access this constant and other Windows API functionality.