Documentation Center

Configuring HTML 5 file types

You can configure HTML 5 settings to customize the way this file type is processed during translation or review.

Procedure

  1. To configure file type settings, go to:
    • Projects view > Home > Project Settings, for the active project.
    • File > Options, for all future projects.
  2. Expand File Types and select HTML 5.
  3. On the Detection page, customize file type definition rules to identify the right file type for processing. The content of the document must match at least one of the following rules:
    • Process HTML fragments - processes HTML documents with the HTML file type, even if the documents are missing the HTML root element. For example, you may have an *.htm file that only contains one HTML fragment: <H3> This is a Heading </H3>. Trados Studio cannot normally open the file without the <html> </html> root element, even if the file has a recognized HTML extension. You can find what document extensions are associated with the HTML file type on the main page of the HTML file type, in the File dialog wildcard expression field.
    • Doctype declaration: - instruction that associates a particular XML document with a document type definition. Active only if Process HTML fragments is not enabled.
    • Root elements: - element definition that enables Trados Studio to process everything inside the declared element as an HTML document. Click Add to add root element definitions. Active only if Process HTML fragments is not enabled.
    • Namespace declarations - namespace definitions used to identify namespaces in the document. Click Add to add namespace definitions. Active only if Process HTML fragments is not enabled.
  4. Select the Parser page, and do one of the following:
  5. On the Writer page, customize encoding and attribute values:
    • Choose when to add Unicode UTF-8 byte order mark (BOM) in the target file:
      • Preserve; don't add if not originally present - does not add byte order mark if the source file is encoded with UTF-8 without BOM.
      • Preserve; add if not originally present - adds byte order mark if the source file is encoded with UTF-8 without BOM.
      • Remove if present - removes byte order mark if the source file is encoded with UTF-8 with BOM.
    • Choose action for xml:lang and lang attribute values:
      • Change matching source language to target language - converts XML Entities from entity references to characters. For example, converts the greater than XML entity &gt to the greater than character >.
      • Always change to target language - changes XML language attribute to target language in the source file.
      • xPath rule - does not change xml language attribute.
    • Choose action for xml:lang and lang attribute values:
      • Change matching source language to target language - converts XML Entities from entity references to characters. For example, converts the greater than XML entity &gt to the greater than character >.
      • Always change to target language - changes XML language attribute to target language in the source file.
      • xPath rule - does not change xml language attribute.
  6. On the Entities page, customize entity conversion:
    • Enable entity conversion - converts XML Entities from entity references to characters. For example, converts the greater than XML entity &gt to the greater than character > .
    • Entity mappings - displays the following information about XML entities. Click on an item in the Entity conversion listbox to see the mappings:
      • Name - name of the XML entity.
      • Char - corresponding character of the XML entity.
      • Unicode Value - unicode value of the XML entity.
  7. On the Whitespace page, customize whitespace processing:
    • Specify how to process Whitespace in content:
      • Always preserve - does not modify whitespaces found in the document.
      • Normalize unless xml:space='preserve' - replaces only the whitespaces which do not have the xml:space='preserve' attribute.
      • Always normalize - replaces all whitespaces found in the XML element with a single space, ignoring any xml:space='preserve' attributes.
    • Normalize whitespaces inside attribute value - replaces all whitespaces found inside the attribute value with a single space.
  8. On the Preview page, add all files required to preview your file (CSS, images, etc) by clicking Add. If your file does not require additional files for preview, skip this step.
  9. On the Embedded content page, customize how embedded content is processed:
    • Server side scripts using - processes content embedded in the server side scripts using the specified embedded content processor.
    • Other elements identified by - processes content embedded in other elements identified by one of the following:
      • Parser rules - processes embedded content found in the file using the Parser rules and the Embedded Processor that you specify. Click Add to add a parser rule.
      • Structure information - processes embedded content in the file using the configured Document Structure Information. Click Add to add a document structure information.
  10. On the QuickInsert page, customize the QuickInsert settings for the QuickInsert group for this type of file.
  11. Click OK to close the window.