This function allows the case of a range of text to be changed. It was created to alter bylines from the Associated Press which are always sent UPPERCASE, but many sites want them to be set in Title Case.

To add functionality to this function it also has the option of handling special cases by searching through a Ruleset. For example the normal Title Case capitalization of McDanial would be Mcdanial. To force it to return to McDanial a ruleset could contain as the Start Tag: Mcdanial and as the Start Tag Replace: McDanial.

This ability to call another ruleset differs from the normal <&recursive: call in that it is limited to particular range of text indicated by the <&changecase: function.

Note: The normal use of Start Tag and End Tag in the rulesets are overridden with this custom function. They only serve to work as a trigger to call this <&changecase: custom function.

Because this function doesn’t normally change the Start Tag and End Tag, it would generally be safest to call it from the rulesets by only specifying a single Start Tag to prevent this function from getting into a loop. Thus you could call this with the Start Tag set to

To change the case of the entire frame, leave the first three parameters blank. This is a fine way to place into Title Case headlines. And using the optional p5 to specify a site created ruleset to lowercase certain words like of, the, and, from, etc., completes the setup.

Warning: This function can be set to change the case of the main story, caption, or nameline. And if that happens too soon in the translation process, it can destroy the standard tags that are used to drive the translation. Thus, <&changecase should be done near the bottom of the ruleset if you are changing all the text.

changecase Details

Title Details
Name changecase
Generic Calls <&changecase:(,,,p4,)>|<&changecase:(p1,p2,p3,p4,p5,p6)>
Sample Calls <&changecase:(,^p,,Title Case)>|<&changecase:(,,,Sentence case)>|<&changecase:(,^p,,Title Case,bylineNames)>
Parameters A maximum of 6 with all only the 4th being required.
p1 Optional. The beginning of the string to search between. This tag will NOT be changed. If p3 is specified, then this p1 will be ignored.
p2 Optional. The endding of the string to search between. As above, this tag will NOT be changed by <&changecase:. If p3 is specified, then this p2 will be ignored.
p3 Optional. When specified it controls the paragraph index of the text to change case of. This is a common way of using <&changecase to control the case of bylines because when the translation of an asset is nearly over, the byline should be paragraph 0 (zero). Paragraph Indexes are zero based (the first paragraph is paragraph 0). Negative values count from the back. Thus -1 is the last paragraph.
p4 Required. This is the case to apply. Currenty the following case types exist: UPPERCASE lowercase Title Case Sentence case As a parameter the case selection should be specified as shown above. If the change case doesn’t happen, check the Translate.log file for details. You can enter those 4 different case types in any case (they do not have to match as they are listed).
p5 Optional: This is a ruleset name that can be used for optional overrides to fix things like ‘DeHavaland’ which the ‘Title Case’ option will incorrectly capitalize. Note that the ruleset will only supply the Start Tag and the Start Tag Replace
p6 Optional: This is an optipnal limit for the number of loops to test. If not specified, the default value is 10. This option was added with version

When using this function with the optional p5 value to do additional overrides with a ruleset, the site must be using browser based rulesets.

Note: <&changecase:’s p5 does NOT function with the legacy Translation Files, thus it won't work with stand alone support for Ad Market or Ad Owl