Click or drag to resize
TranslationServiceHelper Class
Class containing methods for manipulating with Translation Services (XLIFF format).
Inheritance Hierarchy
SystemObject
  CMS.TranslationServicesTranslationServiceHelper

Namespace: CMS.TranslationServices
Assembly: CMS.TranslationServices (in CMS.TranslationServices.dll) Version: 12.0.0
Syntax
C#
public static class TranslationServiceHelper

The TranslationServiceHelper type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberXLIFFEXTENSION
XLIFF file extension
Public fieldStatic memberXLIFFMIME
XLIFF MIME type
Top
Properties
  NameDescription
Public propertyStatic memberAutoImportEnabled
If true, submissions are processed automatically (without explicit approval in administration) when the submission is ready to translate.
Public propertyStatic memberUseCDATAForTranslationUnit
Indicates if CDATA section should be used for translation units.
Top
Methods
  NameDescription
Public methodStatic memberAnyServiceAvailable
Returns true if at least one service is available (= is enabled and its IsAvailable() method returns true).
Public methodStatic memberAutoImportSubmission
Processes the submission automatically if enabled. If auto import is disabled, does nothing.
Public methodStatic memberCancelSubmission
Cancels given submission
Public methodStatic memberCheckAndDownloadTranslations
Checks all the available translation services for given site and downloads the translations if they are available, stores them in the submission.
Public methodStatic memberCheckLicense
Checks license limitation.
Public methodStatic memberCreateSubmissionInfo
Creates new submission to queue (saves it to DB also) and returns the object.
Public methodStatic memberCreateSubmissionItemInfo
Creates new submission item within given submission (saves it to DB also) and returns the object.
Public methodStatic memberCreateTargetCultureNode
Returns document of target culture from specified node or creates new culture version as a copy of the original.
Public methodStatic memberDownloadXLIFF
Starts download of XLIFF document from given submission item.
Public methodStatic memberDownloadXLIFFinZIP
Starts download of XLIFF document from given submission item.
Public methodStatic memberGetCultureCode
Gets culture code for the translation process
Public methodStatic memberGetFormattedStatusString
Returns formatted (colored) status string.
Public methodStatic memberGetPriorityText
Returns text representation of integer priority.
Public methodStatic memberGetSubmissionFileName
Gets submission file name with source and target cultures specified.
Public methodStatic memberGetSubmissionLinkURL
Returns absolute URL of the submission page where a translator can submit translated files.
Public methodStatic memberGetTranslationsEncoding(Int32)
Returns encoding which should be used for translations (export/import of XLIFF) for given site.
Public methodStatic memberGetTranslationsEncoding(String)
Returns encoding which should be used for translations (export/import of XLIFF) for given site.
Public methodStatic memberGetXLIFF(BaseInfo, TranslationSettings, String)
Returns XLIFF export for given object instance.
Public methodStatic memberGetXLIFF(IDataContainer, TranslationSettings, String)
Returns XLIFF export for given IDataContainer object.
Public methodStatic memberGetXLIFF(TreeNode, TranslationSettings, String)
Returns XLIFF export for given TreeNode object.
Public methodStatic memberGetXLIFF(BaseInfo, TranslationSettings, String, Int32, Int32)
Returns XLIFF export for given TreeNode object.
Public methodStatic memberGetXLIFF(IDataContainer, TranslationSettings, String, Int32, Int32)
Returns XLIFF export for given IDataContainer object.
Public methodStatic memberGetXLIFF(TreeNode, TranslationSettings, String, Int32, Int32)
Returns XLIFF export for given TreeNode object.
Public methodStatic memberImportXLIFFfromZIP
Imports XLIFF documents from ZIP file. Returns list of unrecognized filenames, null if everything went ok.
Public methodStatic memberIsAuthorizedToTranslateDocument
Checks whether the user is authorized to translate document.
Public methodStatic memberIsFieldDataTypeAllowedForTranslation
Returns true for Text, LongText, and Binary field types.
Public methodStatic memberIsServiceAvailable
Returns true if specified service is available (= is enabled and its IsAvailable() method returns true).
Public methodStatic memberIsTranslationAllowed
Reflects CMSEnableTranslations setting for specified site.
Public methodStatic memberIsTranslationReady
Returns true if there is at least one translation submission item with target XLIFF for given page and submission is marked as ready.
Public methodStatic memberLogError
Logs an error message to event log.
Public methodStatic memberLogEvent
Logs an event if error occurred during action.
Public methodStatic memberProcessSubmission
Processes all the translations within the submission. Returns null if everything went ok, otherwise return error message.
Public methodStatic memberProcessTranslation(Stream, TranslationSubmissionInfo)
Translates object specified by XLIFF document. Returns translated object if translation went ok, null otherwise.
Public methodStatic memberProcessTranslation(String, TranslationSubmissionInfo)
Translates object specified by XLIFF document. Returns translated object if translation went ok, null otherwise.
Public methodStatic memberResubmitSubmission
Generates XLIFF documents again and resubmits given submission to the service provider. Returns null if everything went ok, otherwise return error message.
Public methodStatic memberSubmitToTranslation
Submits the node for translation. If the service is human translation service, creates the whole submission (submission will contain only specified document).
Public methodStatic memberTranslate
Translates given object using machine translation service. Returns true if translation went ok, false if there was any error.
Public methodStatic memberWriteSubmissionInZIP
Writes the XLIFF documents to translate into a zip file to a given stream.
Top
See Also