private static bool SetInputLanguage(string layoutName)
{
InputLanguageCollection collection = InputLanguage.InstalledInputLanguages;
foreach(InputLanguage lan in collection)
{
if (lan.LayoutName == layoutName)
{
InputLanguage.CurrentInputLanguage = lan;
return true;
}
}
return false;
}