Extension | .dita |
Smartling Identifier | dita |
Example File | not available |
Resources | DITA standards |
Smartling supports DITA file format as defined by the DITA standards version 1.3. Smartling provides a default setup of DITA parsing which determines how tags are treated (inline, block/splits content), what constitutes a placeholder, etc. Customizations to DITA can override Smartling defaults. There are two options on how DITA files can be managed
- Smartling Managed: Smartling will create templates to manage any customizations or overrides from the defaults. This is best if the DITA structure and customizations do not change often.
- Customer Managed: Smartling can provide necessary directives to force customizations or overrides, but the customer would need to manage the directives themselves.
Excluding Content from Translation
Content inline in a DITA file can be marked as not translatable through attributes on tags. In the example below <a> tag is used for the example, but the attributes (class
, translate
, data-sl-notranslate
) are supported for any tag.
<a href="" class="notranslate">
<a href="" translate="no"">
<a href="" translate="no"">
<a href="" data-sl-notranslate="no">
Directives
File directives are supported via our API. Directives are specified in comments within the files, in the following format:
API Parameter
smartling.[directive_name] = [value]
Here are examples of supported directives for DITA:
Directive Name | Values | Description | Example |
A comma-separated HTML tag list |
This parameter forces the HTML parser to treat the listed tags as inline. The difference between block and inline tags is that block tags are used to split HTML into strings, whereas inline tags are included in strings. |
smartling.force_inline_for_tags = external_link,reference Any <external_link> or <reference> tags will be parsed as inline tags. Smartling will not create separate strings for content in these tags.
|
|
whitespace_trim |
|
A whitespace is any character or series of characters that represent horizontal or vertical space in typography. When rendered, a whitespace character is not a visible mark, but does occupy an area or space on a page. Although whitespaces are necessary within a string (typically to separate words), unnecessary whitespaces can be found at the start of a string (leading) and at the end of a string (trailing). With this directive, you can manage whitespace trimming. By default, the leading and trailing whitespaces are trimmed. You can choose to disable trimming or specify trimming for leading or trailing whitespaces. The directive can be used inline or as the API request parameter. |
smartling.whitespace_trim=on Smartling will trim leading and trailing whitespaces (default)
smartling.whitespace_trim=off Smartling will not trim leading or trailing whitespaces
smartling.whitespace_trim=leading Smartling will trim only leading whitespaces
smartling.whitespace_trim=trailing Smartling will trim only trailing whitespaces |