0

我想添加自定义文化,我添加了以下代码,但出现以下错误:

“找不到类型或命名空间 CultureAndRegionInfoBuilder,您是否缺少指令或程序集引用”

虽然我正在使用System.Globalization并添加sysglobal.dll.

string culture = "en-JO";
string name = "Jordan English";

CultureInfo cultureInfo = new CultureInfo("en-GB");
RegionInfo regionInfo = new RegionInfo(cultureInfo.Name);

CultureAndRegionInfoBuilder cultureAndRegionInfoBuilder = 
      new CultureAndRegionInfoBuilder(culture, CultureAndRegionModifiers.None);

cultureAndRegionInfoBuilder.LoadDataFromCultureInfo(cultureInfo);
cultureAndRegionInfoBuilder.LoadDataFromRegionInfo(regionInfo);

cultureAndRegionInfoBuilder.CultureEnglishName = name;
cultureAndRegionInfoBuilder.CultureNativeName = name;

cultureAndRegionInfoBuilder.Register();
4

0 回答 0