2

I need to store a specific culture in a file. Is it enough to serialize the LCID integer or is that a lossy conversion? Is Name, NativeName or EnglishName to be preferred?

David Rutten
  • 4,716
  • 6
  • 43
  • 72

1 Answers1

3

Yes, the LCID is enough to recreate the CultureInfo.

e.g.:

new System.Globalization.CultureInfo(System.Globalization.CultureInfo.CurrentCulture.LCID)

...will create a new CultureInfo that is identical to the current one...

You could alternatively use the Name property:

new System.Globalization.CultureInfo(System.Globalization.CultureInfo.CurrentCulture.Name)
Peter Ritchie
  • 35,463
  • 9
  • 80
  • 98