The 8 Fields or Tags:

There are 8 fields, columns or tags in every Translate Ruleset. These are outlined below and described in further detail after this section.

  1. Comments
  2. Start Tag
  3. Start Tag Replacement
  4. End Tag
  5. End Tag Replacement
  6. Name of the Paragraph Style to Apply
  7. Name of the Character Style to Apply
  8. Custom Function Calls
+1 
Ruleset Fields

The 8 main fields are shown and discussed below.

Rule Comment Field

This opening field is used to provide information on the rule so that you or another Translate Ruleset editor user will know the purpose of the particular rule.

If you do not enter a Rule comment, one will be created for you. The automatic comment will be determined by the contents of the first field. See the discussion on the first field, Start Tag, for details on the text of the automatic comment.

The Rule comment, is however, totally ignored by the procedures that cleanup the text, however, the comments will occasionally be displayed in certain error messages and at certain times in the Translate.log file.

Start Tag Field

This field is required.

This field serves three purposes:

To serve as the entire text of the text to change.

See the example of in the sample file for an example of this use.

To serve as the opening string of a larger string of text to change.

See the example of in the sample file for an example of this use.

To cause BLOX Total CMS for Adobe InDesign and Adobe InCopy to ignore the rest of the line or the rest of the file.

This happens by starting the Start tag: line with any of the following:

  • //
  • /*
  • ....
  • #!

See the lines beginning with // (two forward slashes) for an example of this use.

Start Tag Special Symbols

There must be something in this field or the rest of the line will be ignored and nothing will be processed. Even if other fields have values, if this field is empty the entire line is ignored.

Place // (two forward slashes) in front of

Start Tag to temporarily deactivate a tag rather than deleting it.

If you set the first field to // then the automatic comment will start with Comment and the line will be displayed in the Ruleset editor in Green.

/* (a forward slash and an asterisks) as the first two characters create a Breakpoint. A Breakpoint is a special type of comment. It currently operates the same as a regular comment, but the automatic comment will list Breakpoint and the line will be displayed in Red.

.... (four periods) as the first 4 characters indicate that the rest of the Translate Ruleset will be ignored. I.E. you can place .... as the beginning of the Start Tag field to cause a premature end of file which can be handy during development. When .... is used, the automatic comment will start with the word Stop and the line will be displayed in Bold.

#! (hash bang or shebang) as the first two characters create a special code used to establish Element Types and Export names. When the Start Tag starts with a #! then the automatic comment will start with Directive and the line will be displayed in Gray.

Start Tag Replacement

This field always serves the same purpose: To provide the text that will replace the Start Tag.

This field is optional. When Start Tag and Start Tag Replacement are used, you have a solution for making simple one-to-one translations such as converting from an — to a — (HTML code for em-dash to a printable em-dash). Leaving this field blank will cause the Start Tag to be deleted from the text.

Start Tag Replacement is not used to replace Start Tag when calling custom functions with the exception of those based on <&extend: including <&bygraph:

End Tag

This field serves and the closing or final tag for a string that should be changed.

See the sample line with the for a good example of this field’s set up and use.

This field is optional, but besides serving as a marker for the end of a string of text to be translated, adding something in this field forces BLOX Total CMS for Adobe InDesign and Adobe InCopy to search repeatedly. Leaving this End Tag blank will cause it to only search once for the Start Tag. Generally this is fine because once is all that is needed for any in-line element. However, if the Start Tag is for a PlaceHead, then you will only find and translate the first of that type of PlaceHead.

Use text in the End Tag to guarantee that the translation will look for more than one occurrence of a format. Without a using this field it is possible that only a single occurrence will be translated.

It sometimes takes some thought to determine what to add to the End Tag field to make it search more than one occurrence properly.

End Tag Replacement

This field serves as the replacement text when using a End Tag. Generally this is used to place an alternate tag at the end when using a multi-step process.

See the sample line including the <&size> tag for an example.

This field is optional.

End Tag Replacement is not used to replace End Tag when calling custom functions with the exception of those based on <&extend:

Paragraph Style

Use this field to place the name of the Paragraph Style to apply to the paragraph(s) containing the tags.

If the Paragraph Style does not currently exist, then a dummy style with the specified name will be created. See “Missing Styles” on page <?>.

BLOX Total CMS for Adobe InDesign and Adobe InCopy also has several custom functions that can apply Paragraph Styles and sometimes they can be a better choice. The names of two of the style applying custom functions are pstyle and style.

This field is optional.

Character Style

Use this field to place the name of the Character Style to apply to the characters including and between the specified tags.

If the Character Style does not currently exist in the active document, then a dummy style with the specified name will be created. See “Missing Styles” on page <?>.

BLOX Total CMS for Adobe InDesign and Adobe InCopy also has several custom functions that can apply Character Styles to text and sometimes they can be a better choice than using Field 6. The names two of the custom functions are cstyle and style.

This field is optional.

Translate Script

This field can be most powerful of the 8 fields. Using this field you can string together a host of specialized functions. These functions are described in a later section of the documentation (see “Custom Functions Reference” beginning on page <?> and “Custom Functions List” beginning on page <?>).

One of the most common things to do in this field is to call or branch to another Translate Ruleset via the <&recursive: function.

In addition, there are custom functions which allow a site to call its own custom procedures software for asset cleanup or processing.

Supported Metacharacters

The Start Tag through End Tag Replacement fields of a Translate Ruleset rule supports the following Adobe InDesign and Adobe InCopy metacharacters. To keep things easy to follow, these metacharacters are the same ones used in Adobe InDesign and Adobe InCopy’s Find/Change dialog.

  • ^h an End Nested Style Here character
  • ^n a Forced Line Break ( shift return )
  • ^p an End of Paragraph ( a return )
  • ^t a Tab character
  • ^y a Right Indent Tab character
  • ^8 a normal • Bullet
  • ^9 any single number/digit

Note: ^9 can be used in either the Start Tag or the End Tag fields, but not in the either Replacement field.