针对.NET Framework 3.5及更低版本的Visual Studio 2013 Express无法本地化应用程序.适用于4.0、4.5 [英] Visual Studio 2013 express targetting .NET framework 3.5 and below fails to localize application. Works with 4.0, 4.5

查看:51
本文介绍了针对.NET Framework 3.5及更低版本的Visual Studio 2013 Express无法本地化应用程序.适用于4.0、4.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.针对.NET Framework 3.5及更低版本的Visual Studio 2013 Express无法本地化应用程序.

Hi. Visual Studio 2013 express targetting .NET framework 3.5 and below fails to localize application.

要重现此同位素,请执行以下操作:

To reproduce the isuue, do the followings :

  1. 创建新项目.
  2. 更改.NET框架目标(项目属性>应用程序> ...) 至3.5.
  3. 以"form1"形式插入按钮,保留名称("Button1").
  4. 将Form1.localizable更改为TRUE.然后将语言更改为德语".
  5. 更改Form1.Text,更改Button1.Text.
  6. 然后将语言更改为英语",将这些文本更改为您喜欢的任何内容.
  7. 将语言更改回默认".
  8. 在form1.vb中,添加:
  1. Create new project.
  2. Change .NET framework target (project properties>Application>...)  to 3.5.
  3. In the form "form1", insert a button, leave the name ("Button1").
  4. Change the Form1.localizable to TRUE. Then change language to "German".
  5. Change Form1.Text, Change Button1.Text.
  6. Then Change language to "English", change those texts to whatever you like.
  7. Change language back to "Default".
  8. In form1.vb, add :

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
     ChangeLanguage("de-DE")
End Sub
Private Sub ChangeLanguage(ByVal lang As String)
     ' Make a ComponentResourceManager.
     Dim resources As ComponentResourceManager = New ComponentResourceManager(Me.GetType)
     ' Apply resources to the form.
     resources.ApplyResources(Me, "$this", New CultureInfo(lang))
     resources.ApplyResources(Me.Button1, "Button1")
     Thread.CurrentThread.CurrentCulture = New CultureInfo(lang)
     Thread.CurrentThread.CurrentUICulture = New CultureInfo(lang)
     resources.ApplyResources(Button1.Text, Button1.Name)
End Sub

启动应用程序.

点击"Button1",form1.text和Button1.Text应使用什么"来实现.我们穿上了德语"表格1.

Click on "Button1", the form1.text and Button1.Text should be actualized with what  we have put on "German" Form1.

REM:定位.NET fframework 4.0或4.5,没问题.

REM:Targetting .NET fframework 4.0 or 4.5, no problem.

在Windows XP上的Visual Studio 2008中:没问题.

In visual studio 2008 on windows XP : no problem.

推荐答案

MMoussea,

Hi MMoussea,

由于您的问题与VB更相关.我将您的主题移至我们的VB论坛以寻求更好的支持.

Since your issue is more related to the VB. I moved your thread to our VB forum for better support.

感谢您的理解.

最好的问候,

肖湖


这篇关于针对.NET Framework 3.5及更低版本的Visual Studio 2013 Express无法本地化应用程序.适用于4.0、4.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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