Is there a Microsoft DotNet Library to setup the language on OS like winuserlanguagelist does?
If you're running an UI app like wpf its quite easy to set the keyboard language or culture settings for the application. E.g.: Change system language for one/active window in WPF
Is there a solution to set the Keyboard language for all users on whole computer?
If you want to actually change the user language for the current user and others, this becomes trickier. I looked through PInvoke to check if there are windows dlls for this and i could not find them.
Looking further through msdn i also read this:
To retrieve the user UI language, an application can call GetUserDefaultUILanguage or GetUserPreferredUILanguages. The application cannot change the user UI language, as there is no function to set it.
In cases like these, there's always WMI. Unfortunately - i personally could not find anything to set the language from there.
This answer points out, that this information is likely contained in the Windows registry:
https://stackoverflow.com/a/35704694/4122889
You'll likely need this list of lcids:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f
You'll need to do a reboot after changing the registry.
It seems like this is not that easy to do. I could only think of 2 more options;
- Eavesdrop on the powershell cmd-let to check registry changes or Wmi calls with e.g. process explorer and recreate the logic in C#
- Simply use the process class to run powershell scripts. There is also a powershell runner library out there that could be usefull.
I feel like there are better answers out there, and i'm no Windows veteran, so don't take this as the absolute truth. But i took the time to research your question a bit and i hope this helps you at least a bit.