You can also localize the string values that correspond to each option value in an enumerated property, with the resource attribute in the <option> tag. As with label attributes, a localized enumerated property needs to have a resource bundle defined for it at the property, table, or item descriptor level. Then, you can specify the resource key that holds the localized string value with the resource attribute, as in this example:

<property name="emailStatus" ... data-type="enumerated" ...>
    <option resource="emailStatusUnknown" code="0"/>

When you specify a default, use the resource name as the value, such as:

<property name="emailStatus" ... data-type="enumerated"
          default="emailStatusUnknown" ... >
     <attribute name="useCodeForValue" value="false"/>
     <option resource="emailStatusUnknown" code="0"/>
     <option resource="emailStatusValid" code="1"/>
     <option resource="emailStatusInvalid" code="2"/>

Use caution when localizing the strings used for enumerated types. If you have useCodeForValue set to true, calling getPropertyValue does not return the localized property value. To display the localized value on a page, include the localized string in your page, using a Switch servlet bean to choose the proper value.

For more information about resource bundles and localization, see the Internationalizing a Dynamo Web Site chapter in the ATG Platform Programming Guide.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices