Hey Peter,
Yeah, the SQL CLR projects are a really cool concept and work quite well. We too had the need to localize enums and there is actually an attribute within the framework that allows enums to be localized...or provide a display value different than the actual character representation.
Using a Localization Key
Public Enum MyEnum As Integer
<MicroFour.StrataFrame.Tools.EnumDisplayValue("AppleLocalizationKey", True)> _
Apple = 0
<MicroFour.StrataFrame.Tools.EnumDisplayValue("OrangeLocalizationKey", True)> _
Orange = 1
End Enum
Just providing a more readable display value that isn't localized
Public Enum MyEnum As Integer
<MicroFour.StrataFrame.Tools.EnumDisplayValue("An Apple", False)> _
Apple = 0
<MicroFour.StrataFrame.Tools.EnumDisplayValue("An Orange", False)> _
Orange = 1
End Enum
If you use any of the SF lists and populate using the enum, these values will be automatically pulled when populated. To manually pull the localized or readable value you can call this:
MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(MyEnum.Apple)