The problem (switching language dynamically) is solved with ActivateKeyboardLayout, but it still remains when i dynamically create a component on the form ( for ex. TEdit ). When this component gets into focus, the language changes to default. I tried use again ActivateKeyboardLayout, after creating the components, but it did not worked. Any ideas ?
At first, you have to add the unit "Windows" (or in newer Delphi versions "Winapi.Windows") to the uses list and then you can use this method:
ActivateKeyboardLayout(EnglishLayoutHandle, KLF_ACTIVATE)
You can replace "EnglishLayoutHandle" with any language you want.
ActivateKeyboardLayout documentation