Skip to main content

File translation modes

Once a file is uploaded to the document library, you specify whether the file needs to be translated or not.

Use the method below to make such changes.

NOTE: THIS METHOD DOES NOT APPLY TO CODYT PROJECTS

 

Set or change file translation mode

Use this method to:

  • Mark a document for online translation (i.e. text is extracted and can be translated online)
  • Mark a document for offline translation (text is not extracted and needs to be translated with 3rd party tools)
  • Mark a document for no translation. Use this method to cancel a previous preparation for online/offline

 


URL

(PUT) projects/{projectid}/files/{locale}/file/translation

PARAMETERS

token

The connection token

Required

projectid

The project

Required

locale

Must be the project source language

Required

name

The path/name of the file

Required

newmode

The new translation mode:

  • TranslateNo - This file is not to be translated
  • TranslateYesOnline - The file is marked for online translation
  • TranslateYesOffline - The file is marked for offline translation

Required

parser

Use when "newmode" is set to "TranslationYesOnline" only. Required. Indicates the document format. See Parser configuration for values.

Conditional

parserconfig

Use when "newmode" is set to "TranslationYesOnline" only.

The name of the parser configuration for the ParserDomain document format. If empty, the default configuration is selected. Otherwise specify an existing configuration name.

Conditional

includedtarget

Use when "newmode" is set to "TranslationYesOnline" only.

Used for certain document formats only which include both source and target texts. At the writing of this configuration, this parameter applies to POT files only. If set, then the system will pre-translate texts from the translations supplied in the document.

Conditional

reference

Optional when "newmode" is "TranslationYesOnline" or "TranslationYesOffline

" A user defined and optional document reference which can be used as an alternative user-defined document identifier. The system does not require this reference to be unique within a project.

Optional

version

Optional when "newmode" is "TranslationYesOnline" or "TranslationYesOffline"

A user defined and optional version information.

Optional

versiondate

Optional when "newmode" is "TranslationYesOnline" or "TranslationYesOffline"

An optional date that can be set for this document.NOT YET IMPLEMENTED.

Optional

 

RESULTS

The method executes asynchronously. It returns the id of the asynchronous operation or 0 if the operation has completed immediately:

XML
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2147483647</int>

 

If not 0 then your software should poll the status of the operation every 5 seconds. See Asynchronous operations, operation "asyncoperations/{operationid}/status".

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.