APIs

Translating Microsoft Office Documents via API

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 .docx, .xlsx, .pptx
Smartling Identifier docx, xlsx, pptx
Resources for developers

Smartling supports Microsoft Office file formats: Word (.docx), Excel (.xlsx), Powerpoint (.pptx) on Microsoft 2007 and higher.

Translation of hyperlinks is supported via the directive for .pptx files. Multiple comma separated "noTranslate styles" for .docx 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.  Directives can not be placed directly in these files.  For information about using "styles" to exclude parts of your document see the "Exclude Content using Styles" section of this article.

no_translate_style

This is for .xlsx and .docx files.

Values  Name of a style not to be translated.
Description  Identifies a ‘style’ in an Excel (.xlsx) or Word (.docx) document that should not be translated. By default, text with the SLNOTRANSLATE and NOTRANSLATE styles are not translatable but these defaults will be replaced if no_translate_style is defined. Note that Microsoft Office files do not allow inline directives, so this directive can only be used via the File Upload API request. This directive does not work for .pptx files. 
Examples 

smartling.no_translate_style=PLACENAMES

Text with the ‘PLACENAMES’ style will not be translated.

 

smartling.process_master_slides

This is for .pptx files.

Values true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF
File Format PPTX
Description By default, parser will not ingest content found on master slides.
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

This is for .pptx files.

Values  true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF 
File Format  PPTX 
Description  By default parser will parse text content from handout slide. 
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

This is for .pptx files.

Values  true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF 
File Format  PPTX 
Description  By default parser will parse text content from notes to slides. Can be turned off via directive. 
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

This is for .pptx files.

Values  true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF 
File Format  PPTX 
Description  By default parser will not ingest content from notes to master slide. Can be turned on via directive. 
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

This is for .pptx files.

Values  true|false|TRUE|FALSE|yes|YES|no|NO|off|OFFcomments 
File Format  PPTX 
Description  Can be turned on via directive. 
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

This is for .docx and .xlsx files.

Values  List of no_translate styles, separated by commas. 
File Format  DOCX, XLSX 
Description  By default there 2 no_translate styles: SLNOTRANSLATE and NOTRANSLATE.
if directive is provided - only style name in directive will be used as no-translate style. Directive style name overrides default style names. 
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"

 

This is for .pptx and .xlsx files.

Values  true|false|TRUE|FALSE|yes|YES|no|NO|off|OFF 
File Format  PPTX, XLSX 
Description  It's false by default. Can be turned on via directive. 

 

 

Was this article helpful?