VariationsTranslationTimerJob.ImportTranslationPackage method (String, SPWeb, Int32, IEnumerable<String>)
Creates a work item for the timer job to import an XLIFF translation package.
Namespace: Microsoft.Office.TranslationServices
Assembly: Microsoft.Office.TranslationServices (in Microsoft.Office.TranslationServices.dll)
Syntax
'Declaration
Public Shared Sub ImportTranslationPackage ( _
translatorName As String, _
targetWeb As SPWeb, _
packageId As Integer, _
addressesToEmail As IEnumerable(Of String) _
)
'Usage
Dim translatorName As String
Dim targetWeb As SPWeb
Dim packageId As Integer
Dim addressesToEmail As IEnumerable(Of String)
VariationsTranslationTimerJob.ImportTranslationPackage(translatorName, _
targetWeb, packageId, addressesToEmail)
public static void ImportTranslationPackage(
string translatorName,
SPWeb targetWeb,
int packageId,
IEnumerable<string> addressesToEmail
)
Parameters
translatorName
Type: System.StringEmail addresses that should be notified when the operation is completed.
targetWeb
Type: Microsoft.SharePoint.SPWebName of the entity that performed translation.
packageId
Type: System.Int32Web containing the content in the translation package.
addressesToEmail
Type: System.Collections.Generic.IEnumerable<String>ID of the package item in the Translation Packages library.
Exceptions
Exception | Condition |
---|---|
ArgumentException | |
InvalidOperationException | The web is not configured for translation. |
UnauthorizedAccessException | The current user has insufficient permissions. |
[System.Xml.Schema.XmlSchemaException] | A package does not comply with the strict schema of XLIFF Version 1.2 or is missing notes required to perform an import. The message contains the ID of the first failing file in the package. |
Remarks
The package must be in the translation packages library on the root web of the site collection containing targetWeb. The current user must have the CancelCheckout permission to perform the operation if the translation package contains content for more than one item.
See also
Reference
VariationsTranslationTimerJob class
VariationsTranslationTimerJob members