切换写作语言 [英] switch writing language

查看:89
本文介绍了切换写作语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何在wpf应用程序中通过代码c#将应用程序中的书写语言从英语切换为阿拉伯语,从阿拉伯语切换为英语? 谢谢您的帮助

[添加了适当的标记:WPF.请确保在适用的情况下始终标记要使用的应用程序类型和UI库. SA]

解决方案

您可以在主窗口constructor 或其load event中设置应用程序语言:

 InputLanguageManager.SetInputLanguage( CultureInfo(  en-US")); 



要查看可用的语言列表,请在页面中放置一个列表框并设置其itemsource :

 listbox1.ItemsSource = InputLanguageManager.Current.AvailableInputLanguages; 



"en-US"替换为所需的区域性名称,该名称在ListBox中列出.

希望对您有所帮助.



试试这个
实现多语言WPF应用程序的最简单方法 [ ^ ]

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]

解决方案

You can set your application language in your main window constructor or its load event :

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 :

listbox1.ItemsSource = InputLanguageManager.Current.AvailableInputLanguages;



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

Hope it helps.


hi,
try this
Simplest Way to Implement Multilingual WPF Application[^]


这篇关于切换写作语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆