WinForms本地化.该语言不反映默认的resx文件 [英] WinForms Localization. The language does not reflect the default resx file

查看:90
本文介绍了WinForms本地化.该语言不反映默认的resx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Winform应用程序中使用本地化,但我有几个问题.我本来想问最复杂的一个,但是现在我遇到了一个基本问题.

I am trying to use localization in a winform application and I have several questions. I was going to ask the most complex one but now I have got into a basic problem.

我已经用表格,标签和菜单条构建了一个基本的winform.

I have build a basic winform with a form, a label and a menustrip.

我已将表单本地化设置为true,并以三种不同的语言设置了标签的文本.结果,我得到了Form1.es.resx,Form,1.ja.resx和默认的Form1.resx.

I have set the form localization to true and set the text of the label in three different languages. As a result I got Form1.es.resx , Form,1.ja.resx and the deafult Form1.resx.

我已经检查了,默认的是英文.但是,当我运行该应用程序时,该标签以日语显示(我的操作系统为Windows Japanese). Form1.resx不是默认值吗?

I have checked and the default one is in english. However when I run the application, the label appears in japanese (my OS in windows japanese). Is Form1.resx not the default?

当我将Form1 Language属性设置为English时,也会发生这种情况.

This also happens when I set the Form1 Language property to English.

推荐答案

运行应用程序时,标签以日语显示(我的操作系统为 Windows日语). Form1.resx不是默认值吗?

When I run the application, the label appears in japanese (my OS in windows japanese). Is Form1.resx not the default?

对于没有当前线程UI文化的语言资源文件的情况,默认资源文件是一个后备.由于您的默认操作系统语言是日语(默认情况下,除非您通过代码对其进行更改),所以当前的线程UI文化是日语,并且由于您具有日语文件,因此该表单将以日语显示.

The default resource file is a fallback for cases that you don't have a language resource file for current thread UI culture. Since your default OS language is Japanese (by default, unless you change it through the code) then the current thread UI culture is Japanese and since you have Japanese language file, then the form will be shown in Japanese language.

这篇关于WinForms本地化.该语言不反映默认的resx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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