简体   繁体   English

C#程序设置和本地化

[英]C# Program Settings and Localizing

So I'm starting my first actual Program in C# now, and just before I dig into the actual functions, I'm asking myself about localization of a Program. 因此,我现在开始使用C#启动我的第一个实际程序,就在我深入研究实际功能之前,我在问自己关于程序的本地化的问题。

I thought, a .resx is nice for the language-variables to store. 我认为,.resx非常适合存储语言变量。 But how can I get that into the settings? 但是我如何才能进入设置呢? I see there is a .settings file, where I can assign Settings for the program, but how can I add my language.resx to these settings, so if there are several installed the user can select which language to use? 我看到有一个.settings文件,可以在其中分配程序的设置,但是如何将我的language.resx添加到这些设置中,因此,如果安装了多个设置,则用户可以选择使用哪种语言?

Furthermore, I'm designin the program using the winform designer - how can I tell a control to use a string of the resourcce as a text rather than type it in by hand? 此外,我正在使用Winform设计器在程序中进行设计-如何告诉控件使用资源字符串作为文本,而不是手动输入?

I'm sure there are a bunch of tutorials out there concerning my issues, but 2 hours of searching haven't got me anywhere, so if anyone has some suggestions for me, I'd be very thankful =) 我敢肯定有很多关于我的问题的教程,但是经过2个小时的搜索我却一无所获,所以如果有人对我有一些建议,我将非常感激=)

This seems to be similar to question 1142802, so maybe that is a good place to start . 这似乎类似于问题1142802,因此也许这是一个不错的起点

ed: It depends on the control a bit I guess, but for a menu you could create a method that defines it's contents . ed:我想这取决于控件,但是对于菜单,您可以创建定义其内容的方法 You'd then be able to do something like menuItem1.Text = string.Item1Text . 然后,您将能够执行诸如menuItem1.Text = string.Item1Text

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM