Documentation Center

Configuring custom attributes in the desc.xml file

Certain WorldServer objects can have custom attributes and users can specify values for these attributes. Attribute filters are useful, for example, when you search or export translation memories or terminology databases.

Procedure

  1. Open the desc.xml file.
  2. Add an entry according to the following template:
    <attribute name="attribute name" ui_name="ui name" object_type="object_type" flags="flags" type="attribute type">
       <option value="option1"/>
       <option value="option2"/>
    </attribute>
    In this case:
    PropertyDescription
    nameThe name of the attribute to be used in the API to retrieve the attribute from the object.
    ui_nameThe description of the attribute. Users can see this description on the user interface.
    object_typeThe type of object for which you are creating the custom attribute. Possible values are:
    • vendor
    • project
    • task
    • user
    • tmtranslation (for TM entries)
    • tdentry
    • tdterm
    • workflowrole
    • workflowgroup
    • tmgroup (for both TMs and TM groups)
    • tdgroup (for both TDs and TD groups)
    • workflow
    • issue
    • costmodel
    flagsOptional flags:
    • is_hidden: The attribute is never displayed on the user interface. Only the API can access the attribute.
    • is_readonly: The attribute cannot be modified on the user interface. Only the API can modify the attribute.
    • is_required: Users must assign a value to the attribute.
    • is_included_in_translation_kit: The attribute is included in the translation kits created by WorldServer.
    typeThe type of data allowed for the attribute:
    • boolean: TRUE or FALSE.
    • date: A date.
    • integer: Any positive integer.
    • selector: A set of predefined values.
    • text_area: Text in a larger area.
    • text: Text in a field. Select this for TM attributes.
    • user: A WorldServer user.
    • attachment: Specify the location of a file as a value. It is rendered as a link.
    • multi_selector: Allows users to specify multiple values from a set of predefined values.
    • image: A specialized variation of the attachment attribute type that is displayed on the user interface as an image.
    • comment: A special type of text area that maintains a history of added text.
    • url: A sub-type of the text attribute type that is rendered as a link.
    • large_text_area: A variation of the text_area attribute type through which users can store an unlimited amount of text data.
    • html: A variation of the large_text_area attribute type through which advanced users can type freeform HTML, which is rendered directly as HTML in WorldServer.
    • list: An arbitrary collection of one or more text items.
    option valuePredefined value for the selector type attribute.

Sample custom attribute entry

<components>

    <!-- Shows you how to create an attribute using the component descriptor file -->
   <attribute name="Sample_Attribute" ui_name="My first attribute"
      object_type="user"
      flags="readonly" type="selector">
      <option value="My first value"/>
      <option value="My second value"/>
   </attribute>

</components>