Preparing & Translating Supported File Types


See Placeholders in Resource Files for more on placeholders.

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

  1. 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.
  2. Customer Managed:  Smartling can provide necessary directives to force customizations or overrides, but the customer would need to manage the directives themselves.

Mark Content as Not Translatable

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 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">


Standard Placeholder Format

See Placeholders in Resource Files for more on placeholders.


File directives are supported, both inline and via our APIDirectives are specified in comments within the files, in the following format:

Inline File Format

<!-- smartling.[directive_name] = [value] -->

API Parameter

smartling.[directive_name] = [value] 

Here are some examples of [directive_name], along with example values or paths.



Description  Used to specify a standard placeholder format. 

<!-- smartling.placeholder_format = IOS -->

Specifies iOS-style placeholders for the file.




1) Custom Java compatible regular expression.
2) NONE - disables any current custom placeholders 

Description  Specifies a custom placeholder format. Any text in your file matching the regular expression you provide will be captured as a placeholder.


Any characters surrounded by curly brackets, e.g., {first name}, will be treated as a placeholder.

See Placeholders in Resource Files for more on placeholders.


Values  Tags such as: <ol>, <li>, <strong>, <icon>
Description This directive allows for specified tags to be treated as inline tags (visible and moveable for translators and editors) versus block-level tags (creates a new string and are not visible).

<!-- smartling.force_inline_for_tags = icon, tooltip -->



Values  Comma-separated list of attributes

By default, HTML tag attributes are captured as part of the tag itself and therefore are not translatable.

This directive instructs Smartling to capture the text of a list of HTML attributes for translation. For example, this can be used to capture the title attribute of a button.


<!-- smartling.include_translatable_attributes = title, alt -->

Will capture text in title and alt attributes of any element as a translatable string



Values Integer - Accepted values are 0 - 100
Description Sets the percentage by which original strings are inflated when downloading pseudo translations. If this directive is not set, pseudo translations are 30 percent longer than the original strings.

<!-- smartling.pseudo_inflation = 80 -->

Downloaded pseudo translations will increase the length of original strings by 80 percent.




on|yes|true or off|no|false or leading|trailing

The default value is on


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 trim whitespaces, as it enables or disables whitespace trim management for the ingested strings.

Whitespace is optionally trimmed from content then re-inserted on download for convenience so that translators do not have to manage the extra spaces. However, content owners may want to retain surrounding whitespace so that translators can
manipulate it during translation.

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


Was this article helpful?