After searching a lot on internet when I could not get a solution I am here.
I have a requirement in my project which supports multiple languages.
When I am switching to a specific language it works fine if the language is already there in system language preferences, if not it shows an error.
To resolve error I had to go manually to the below location and then add language.
Control Panel\All Control Panel Items\Language >> Add a Language
And everything works as expected.
This is what I want to do programmatically: In code somehow I could add a language to system language preference list.
(c# - preferred language).
How would I do this?