Why LCID is not unique?

469 Views Asked by At

Why LCID is not unique? My code:

var data = CultureInfo.GetCultures(CultureTypes.AllCultures)
  .OrderBy(n=>n.LCID).ToArray().GroupBy(s => s.LCID)
  .Where(n=>n.Count() > 1).SelectMany(m => m);

I see two LCID is not unique: 4 and 31748.

Therefore I can't use such code:

Dictionary<Int32, CultureInfo> valid_lcids =
 CultureInfo.GetCultures(CultureTypes.AllCultures).ToDictionary(
 c => c.LCID, c => c);
1

There are 1 best solutions below

1
On BEST ANSWER

try using CultureTypes.SpecificCultures