Jump to content

Recommended Posts

Posted

Can i get current language of keyboard?

There are a few macros for languages. Check the macros section of the help file.

@KBLayout - Returns code denoting Keyboard Layout.

@OSLang - Returns code denoting OS Language.

Posted (edited)

@KBLayout - Always returns 0409 (EN) :)

It is Default keyboard layout, but i need - current input language...

Edited by Krol
Posted

You mean taking an input from the user and determining what language it is?

Ohhh... let's just say that's impossible. Only humans could do that.. look at "This phrase" and tell it's English, and "diese Phrase" and tell it's German, and "cette expression" and say it's French. If there is a system out there to do it, it must have some flaws, obviously.

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Posted

Im not about a phrase!

I about that what language of input am chosen during this or that moment.

If English - MsgBox (0, " Current Language ", "0409")

Russian - MsgBox (0, " Current Language ", "0419")

:)

Posted

Im not about a phrase!

I about that what language of input am chosen during this or that moment.

If English - MsgBox (0, " Current Language ", "0409")

Russian - MsgBox (0, " Current Language ", "0419")

:)

Haven't had time to fully investigate, but you might get somewhere with this http://msdn2.microsoft.com/en-us/library/ms724947.aspx and "SPI_GETDEFAULTINPUTLANG".

If you're not much for API calls, PaulIA's Auto3Lib has an "_API_SystemParametersInfo()" function that should work.

You'll also need info on the different language/sub language constants, which can be found here: http://msdn2.microsoft.com/en-us/library/ms776294.aspx

Finally, some usefull general information here: http://www.microsoft.com/globaldev/getWR/s.../WRG_kybrd.mspx

Hope that helps.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...