title: Enum serialization with resource string
body: <p>I am trying to figure out a way to have some enum values serialized using a localized resource string.</p>
  <p>I am using the [EnumMember] attribute whenever I want to serialize the enum with a friendly description. (for example if there are spaces in the description as shown in my code sample below.)</p>
  <p>This all works great - however now I have the requirement to localize the string description of a couple of the enum values.  For example, if the enum SupportState, represents a US State, as shown below it is serialized as &quot;Support State&quot;.  All good.  But ideally I want the EnumMember value string to be localized using a resource string.  That way see my culture/locale is en_CA (English Canada), then the enum is still SupportState in the code but the serialized value will be &quot;Support Province&quot;<br />
  I want to keep the same enum name but want the value string to be localized.</p>
  <p>I am not sure how to do this - is there a way to get that localized resource string into the EnumMember constructor?  The [EnumMember] attribute is sealed so I can't inherit from it...</p>
  <p>Is there a better recommended way to achieve this?</p>
  <pre><code>public enum Settings {
  
  [EnumMember(Value = &quot;Support State&quot;)] // want a localized resource string - eg. Support Province
  SupportState = 1,
  [EnumMember(Value = &quot;Support Zip&quot;)] // want a localized resource string - eg. Support Postal Code
  SupportZip = 2,
  
  }```
  </code></pre>