sa3q
asked on
i want long number of keyboardlayout for many language can any body help?
i want long number for english and arabic and hebrew and rasha
like this what iwant i want only the number
this code in visual basic have the long numbers
if GetKeyboardLayout(0) = 67699721 then
messagebox('Language', 'English')
elseif GetKeyboardLayout(0) = 67189761
like this what iwant i want only the number
this code in visual basic have the long numbers
if GetKeyboardLayout(0) = 67699721 then
messagebox('Language', 'English')
elseif GetKeyboardLayout(0) = 67189761
It is a lot easier if you work in hex.
First code is 04090409
Breaking this up - the top half is the language , the bottom half is the keyboard. In this case top half 0409 is US English, bottom half is US English layout
The second number is 04013C01
401 = Arabic (Saudi)
3C01 = Arabic (Bahrain)
Have a look at http://www.science.co.il/Language/Locale-Codes.asp?s=codepage
Split the codes into what you want , language and keyboard wise and you will get the code.
Eg British English, French keyboard is 0409040c
First code is 04090409
Breaking this up - the top half is the language , the bottom half is the keyboard. In this case top half 0409 is US English, bottom half is US English layout
The second number is 04013C01
401 = Arabic (Saudi)
3C01 = Arabic (Bahrain)
Have a look at http://www.science.co.il/Language/Locale-Codes.asp?s=codepage
Split the codes into what you want , language and keyboard wise and you will get the code.
Eg British English, French keyboard is 0409040c
ASKER
english have id in long type=67699721
i want the long type for arabic and hebrew and rasian only
that what i want
i want the long type for arabic and hebrew and rasian only
that what i want
A the docs on 'GetKeyboardLayout()' (http://msdn.microsoft.com/en-us/library/ms646296(VS.85).aspx) state "The return value is the input locale identifier for the thread. The low word contains a Language Identifier for the input language and the high word contains a device handle to the physical layout of the keyboard.". So you basically need toe low word of the return value and compare that to the language Ids you want to examine (see http://msdn.microsoft.com/en-us/library/dd318693(VS.85).aspx - "Language Identifier Constants and Strings" for all possible layouts), e.g.
HKL hkl = GetKeyboardLayout(0);
DWORD dwLangId = LOWORD(hkl);
if (dwLangId == MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_UK)) {
// UK layout
}
So, don't you have the hebrew from cup's excellent post?
The second number is 04013C01
0401 = Arabic (Saudi) - language
3C01 = Arabic (Bahrain) - keyboard?
The second number is 04013C01
0401 = Arabic (Saudi) - language
3C01 = Arabic (Bahrain) - keyboard?
Hebrew is
MAKELANGID(LANG_HEBREW,SUBLANG_HEBREW_ISRAEL);
Similarly Russian would be
MAKELANGID(LANG_RUSSIAN,SU BLANG_DEFA ULT);
There is no sublanguage for Russian.
MAKELANGID(LANG_RUSSIAN,SU
There is no sublanguage for Russian.
ASKER
i want the long id only for the hebrew any answer pass that i will accept it
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ignore my last one. From cup's excellent link:
Hebrew 1037 040d
Hebrew 1037 040d
So actually:
040d040d
hex
040d040d
hex
ASKER
thanks
Does that do it?