0

I want to add custom culture, I have added the following code but I am getting the following error:

"the type or namespace CultureAndRegionInfoBuilder could not be found ,are you missing directive or assembly reference"

Although I am using System.Globalization and added 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();
Pawel
  • 31,342
  • 4
  • 73
  • 104
aayyad
  • 57
  • 5
  • 10

0 Answers0