DITA
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.
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 Perl 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 square brackets will be treated as a placeholder. |
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. |