c# 第三方控件 多语言设置问题

  最近有个项目用了第三方控件,ComponentOne Studio ,界面本身支持多语言,包括中文,但程序运行起来,控件只有英文界面。

  查半天资料没有结果。


  原因:VS项目有语言支持设置,SupportedCultures,默认值为空

  VS本身没有提供此项设置,需要自己修改csproj文件进行设置

  用记事本或者其他工具打开  你的项目.csproj

  找到SupportedCultures ,设置需要设置语言,中文是zh-Hans

  例子:

  

  <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
    <SilverlightApplication>true</SilverlightApplication>
    <SupportedCultures>
    </SupportedCultures>

  修改为:

  

    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
    <SilverlightApplication>true</SilverlightApplication>
  <strong>  <SupportedCultures>zh-Hans</SupportedCultures></strong>

猜你喜欢

转载自blog.csdn.net/luozhuang/article/details/51783125
今日推荐