StrataFrame Forum

Enumerations and Localization

http://forum.strataframe.net/Topic2709.aspx

By Ivan George Borges - 9/8/2006

Hi guys.

Would it be possible to declare Enum members as SF localizable keys ?

By Steve L. Taylor - 9/9/2006

Ivan what are you doing working so late?  You will be happy to know the upcoming release 1.5 has a new attribute for enum localization.  In fact we changed all of the enums in security for some guy in Brazil -- what a pain BigGrin

The following snippets reveal its simplicity.

Steve

'-- Standard Enum
Public Enum DeniedActions as Integer
  NoMessage = 0
  ReplaceEachCharacter = 1
End Enum

'-- Localized Enum
Public Enum DeniedActions as Integer

  <EnumDisplayValue("IVANEnum - Message", True) > _
  NoMessage = 0

 <EnumDisplayValue("IVANEnum - Replace", True) > _
  ReplaceEachCharacter = 1
End Enum

Attribute Constructor
 New(ValueorKey as String, IsLocalizationKey as Boolean)

By Ivan George Borges - 9/10/2006

Working so late ?
What time is it ?
What's the day today ?
I locked myself in a room and someone feeds me everynow and then ...Crazy