Supported File Types

DITA

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.

Directives

Format

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

 

placeholder_format

Values  NONE; C; IOS; PYTHON; JAVA; YAML; QT, RESX 
Description  Used to specify a standard placeholder format. 
Examples 

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

Specifies iOS-style placeholders for the file.

 

placeholder_format_custom

Values

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.
Examples 

<!--smartling.placeholder_format_custom=\{([^}]+)\}-->

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.

force_inline_for_tags

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).
Examples 

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

 

include_translatable_attributes

Values  Comma-separated list of attributes
Description Instructs Smartling to capture the text of a list of attributes for translation. For example, this can be used to capture the title attribute of a button.
Examples 

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

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

 

pseudo_inflation

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.
Examples 

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

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

 

whitespace_trim

Values 

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

The default value is on

Description 

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.

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.

Examples 

<!-- 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?