Click here to Skip to main content
15,906,628 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi,
how can i switch the writing language in my application from English to Arabic and From Arabic to English , by code c# in a wpf application??
thx for helping

[Appropriate tag added: WPF. Please makes sure you always tag your application type and UI library to be used where applicable — SA]
Posted
Updated 28-Jan-12 11:16am
v2

You can set your application language in your main window constructor or its load event :
C#
InputLanguageManager.SetInputLanguage(this, new CultureInfo("en-US") );


To see the available list of languages drop a list box in your page and sets its itemsource :
C#
listbox1.ItemsSource = InputLanguageManager.Current.AvailableInputLanguages;


Replace "en-US" with your desired culture name which is listed in the ListBox.

Hope it helps.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-Jan-12 17:17pm    
Correct answer, my 5.
--SA
Amir Mahfoozi 28-Jan-12 23:56pm    
Thank you. :)
 
Share this answer
 

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