This article is written for developers who are integrating with the Smartling platform via the API. If you will be uploading documents using the dashboard, please see the article for dashboard users.
Extension | .doc, .docx, .docm, .xlsx, .ppt, .pptx |
Smartling Identifier | doc, docx, docm, xlsx, pptx |
Resources | for developers |
Smartling supports Microsoft Office file formats: Word (doc, .docx, and .docm), Excel (.xlsx), PowerPoint (.pptx) on Microsoft 2007 and higher.
Translation of hyperlinks is supported for all supported file types via file rewrite rules, or a directive.
Multiple comma separated "noTranslate styles" for .doc, .docx, .docm and .pptx files are supported.
Content to be EXCLUDED for translation directly in the document using standard formatting - see our Managing Business Documents for more detail. Optionally, the style to be excluded can be set using a File API directive.
Directives
Directives are commands embedded in code that essentially direct Smartling to the various elements in your file.
Directives for office documents can only be provided via API integration or by creating a custom template for your account. Consult your Customer Success Manager or Solutions Architect for more information on custom templates.
Directives cannot be placed directly in these files. For information about using "styles" to exclude parts of your document, read the Exclude Content using Styles.
smartling.process_master_slides
Values | true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | PPT, PPTX |
Description | This directive decides if Smartling should ingest content from master slides for translation.
By default, Smartling will not ingest content found on master slides (false). |
Examples | curl -X POST -H "Authorization: Bearer {TOKEN}" -F "file=@master_page_parse.docx" -F "fileUri=master_page_parse.docx" -F "fileType =DOCX" -F "smartling.process_master_slides=true" "https://api.smartling.com/files-api/v2/projects/{PROJECT_UID}/file" |
smartling.process_handout_slide
Values | true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | PPT, PPTX |
Description | This directive decides if Smartling should ingest content from the handout slide. By default, Smartling will parse content from handout slide (true). |
Examples | curl -X POST -H "Authorization: Bearer {TOKEN}" -F "file=@master_page_parse.docx" -F "fileUri=master_page_parse.docx" -F "fileType =DOCX" -F "smartling.process_handout_slide=false" "https://api.smartling.com/files-api/v2/projects/{PROJECT_UID}/file" |
smartling.process_slide_notes
Values | true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | PPT, PPTX |
Description |
This directive decides if Smartling should ingest notes from slides. By default, Smartling will parse text content from notes to slides (true). |
Examples | curl -X POST -H "Authorization: Bearer {TOKEN}" -F "file=@notes_off.docx" -F "fileUri=notes_off.docx" -F "fileType =DOCX" -F "smartling.process_slide_notes=false" "https://api.smartling.com/files-api/v2/projects/{PROJECT_UID}/file" |
smartling.process_master_notes
Values | true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | PPT, PPTX |
Description | This directive decides if Smartling should ingest notes from master slides. By default, parser will not ingest content from notes to master slide (false). |
Examples | curl -X POST -H "Authorization: Bearer {TOKEN}" -F "file=@master_notes_on.docx" -F "fileUri=master_notes_on.docx" -F "fileType =DOCX" -F "smartling.process_master_notes=true" "https://api.smartling.com/files-api/v2/projects/{PROJECT_UID}/file" |
smartling.process_user_comments
Values | true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | XLS, XLSX | PPT, PPTX | DOC, DOCX, DOCM |
Description |
This directive decides if comments in the file are ingested for translation. Default behavior for .xls and .xlsx is on. |
Examples | curl -X POST -H "Authorization: Bearer {TOKEN}" -F "file=@user_comments_on.docx" -F "fileUri=user_comments_on.docx" -F "fileType =DOCX" -F "smartling.process_user_comments=true" "https://api.smartling.com/files-api/v2/projects/{PROJECT_UID}/file" |
smartling.no_translate_style
Values | List of no_translate styles, separated by commas, e.g. STYLE1, STYLE2 |
File Format | XLS, XLSX | DOC, DOCX, DOCM |
Description |
This directive excludes content from translation. There are two "no_translate" styles: SLNOTRANSLATE and NOTRANSLATE. Paragraphs with specified style names applied to them will not be ingested for translation. Note: for DOC/DOCX/DOCM file format styles, that this directive refers to are paragraph styles. Which means that style applied on paragraph-level basis, hence Smartling will not ingest an entire paragraph if it is marked with no-translate style. Default value consist of 2 no-translate styles: SLNOTRANSLATE/NOTRANSLATE |
Examples | curl -X POST -H "Authorization: Bearer {TOKEN}" -F "file=@specific_no_translate.docx" -F "fileUri=specific_no_translate.docx" -F "fileType =DOCX" -F "smartling.no_translate_style=MyStyle1,Mystyle2" "https://api.smartling.com/files-api/v2/projects/{PROJECT_UID}/file" |
smartling.translate_hyperlinks
Values | true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | XLS, XLSX | PPT, PPTX | DOC, DOCX, DOCM |
Description | This directive decides if Smartling should ingest hyperlinks for translation.
Default value is false. |
smartling.variants_strategy
Values |
context_match | repetition_indexed | none |
File Format | XLS, XLSX | PPT, PPTX | DOC, DOCX, DOCM |
Description |
Values are case-insensitive. The default value is repetition_indexed, which means that the string indexes as variants for repeated strings functionality is enabled. context_match enables ICE variants functionality. ICE variant is defined as a variant on a string calculated by the exact character text of the preceding and following strings if any. This combines the two surrounding strings with a separator character sequence to differentiate between ending and starting strings in a document. NOTE: using this directive will override any use of variants_enabled and its supporting directives. |
Examples |
smartling.variants_strategy=context_match |
smartling.translate_sheet_names
Values |
true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF |
File Format | XLS, XLSX |
Description |
The default value is off. The name of each sheet is ingested as a translatable string, even if there is no content on the sheet. To include sheet names for translation, use true, yes, on. To prevent sheet names from being ingested into Smartling as a translatable string, use false, no, off (default). |
Examples |
smartling.translate_sheet_names=true |
smartling.whitespace_trim
Values |
on|yes|true or off|no|false or leading|trailing The default value is on |
File Format |
DOC, DOCX, DOCM | PPT, PPTX | XLS, XLSX, XLSX_TEMPLATE |
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 will trim leading and trailing whitespaces (default)
Smartling will not trim leading or trailing whitespaces
Smartling will trim only leading whitespaces
Smartling will trim only trailing whitespaces |
smartling.no_translate_hidden_elements
Values | sheets | rows | columns |
File Format | XLS | XLSX |
Description |
By default, parser will ingest all content in a spreadsheet, including hidden sheets, columns and rows. With this directive, you can exclude hidden content in sheets, rows, and columns from being ingested to Smartling for translation. |
Examples |
smartling.no_translate_hidden_elements=rows,columns |
smartling.no_translate_placeholder_style
Values | A character style name/comma-separated style names, e.g. STYLE1, STYLE2 |
File Format | DOC, DOCX, DOCM |
Description |
Any text element marked with the Character type style names, provided by this directive, will not be ingested for translation. There is no default value for this directive. |
Examples |
smartling.no_translate_placeholder_style=STYLE1,STYLE2 |
smartling.locale_column_header_format
Values |
One or more of the following variables: ${locale.id} |
File Format | XLS | XLSX |
Description |
External directive that specifies a column header format for the column with translations for particular locale in downloaded xlsx file with multi-locale translation. For instance, for the fr-FR locale, the following format: ${language.description} (${country.description}) results in this header in the translated file: French (France) |
Examples |
smartling.locale_column_header_format = smartling.locale_column_header_format = smartling.locale_column_header_format = language: |
smartling.translate_revisions
Values |
true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF Default: false|FALSE||no|NO|off|OFF |
File Format | DOCX |
Description |
By default, Smartling translates the latest version of a document with Accept-All-Revisions before parsing the document on strings/parts. This directive allows you to translate all revisions and have translated history of revisions, by keeping all changes/revisions as special blocks (<ins>, <del>,<span> html tags). You may also want to use smartling.process_user_comments directive to translate comments to revisions. |
Examples |
|