Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How to change the default language for windows xp by c# code?

Please guide me,Thanks.
Posted
Comments
Sandeep Mewara 16-Aug-10 3:40am    
Did you tried Google?
Per Söderlund 16-Aug-10 7:10am    
I agree, google it.
all settings for windows are stored in the registry.So you can change it there.

1 solution

Hello
It's solved.
Tanks.

private InputLanguage GetFarsiLanguage()
{

foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)
if (lang.Culture.EnglishName.ToLower().Contains("iran"))
return lang;

return null;

}

public void YourMethod()
{
if (InputLanguage.CurrentInputLanguage == GetFarsiLanguage())
MessageBox.Show("System Language is farsi...");

else
{
InputLanguage lang = GetFarsiLanguage();
if (lang == null)
throw new NotSupportedException("Farsi Language keyboard is not installed.");

InputLanguage.CurrentInputLanguage = lang;
MessageBox.Show("System Language changed to farsi.");
}

http://www.barnamenevis.org/forum/showthread.php?mode=hybrid&t=233846[^]
 
Share this answer
 
v2
Comments
Dalek Dave 16-Aug-10 17:39pm    
Reason for my vote of 5
Good for you in solving it yourself

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900