A separate Scheduled Export must be defined for each repository and language to be translated. For example, if the Brand repository has multi-language attributes and the active languages are English (default), Spanish, French, German, and Chinese, there needs to be four Translation Request scheduled exports defined to translate from English to Spanish, French, German and Chinese. If the Item repository also contains multi-language attributes that need to be translated to the same languages, four additional Translation Request scheduled exports must be defined.
Each Scheduled Export should have the following settings:
Attribute Name | Value |
---|---|
Export Name | Identifies the repository and language and that it is for language translation requests. It is recommended that the name for each of these exports is consistent and identifies the repository and language (e.g., Item Language Translation Request French). |
Export Type | View |
Postprocess File | Yes |
Postprocess Class | com.enterworks.services.changenotification.ProcessLanguageTranslationRequest |
Postprocess Keys Postprocess Values |
See post process details below |
Export Language | Set to the requested translation language |
View SQL | See stored procedure details below |
View Format | COMMA |
Export File Name | LTR_<repo>_<language>_||Export Job||.csv – all translation request file names should follow the same pattern so the responses can be processed by the same Scheduled import without having to rename the files. |
Dependent Operation Type | Import |
Dependent Operation | CN_Request_Translation_Log |
Dependent Operation Immediate | Yes |
Dependent Keys |
|
Dependent Values |
|
The
com.enterworks.services.changenotificaion.ProcessLanguageTranslationRequest
post-processing block must be configured for each Scheduled Export. This post-processing
block converts the exported file into a second file to be loaded into the Change
Notification Translation Log repository. This second file contains all of the columns in
the original file (described above) except for the descriptive attributes plus the
request status of "Requested" and the current date for the Request Date. The
post-processing block has the following configurable arguments:
Argument | Description |
---|---|
fileEncoding | Specifies the encoding for files. The default is UTF-8 |
requestFileFormat | Format for the translation request file: XLSX or CSV |
logFileImportTemplate | CN_Request_Translation_Log - Name of the import template used to update the CN_Translation_Log repository. This import template must be invoked by a Scheduled Import that is launched as a Dependent Operation for this export. |
logFileDirectoryName | Location of where the Translation Log import files are to be placed for processing. The Scheduled Import must have this same directory name. Example: D:/Enterworks/shared/ImportSubmissions |
logFileName | TR_UpdateLog_||Export Job||.csv. Name of the Translation Log import file. This name must match the Dependent Value for the Dependent Key "Import File Name" |
Each scheduled export invokes the SQL stored procedure CN_Generate_Translation_Request_File, passing in the following arguments:
Argument | Description |
---|---|
repositoryName | Name of the repository |
languageExt | Extension of the source language (default if null) |
translateLanguageExt | ||Export Language|| - Extension of the target language |
translationName | Name of the applicable translation definition in the Change Notification Translation Registry repository |
batchId | ||Export Job|| - A unique number |
debugInd | 0 - Output debug logging if 1 |
The following example shows the SQL for translating French to the language defined in the Export Language attribute for the language translation named: Graco Item Translation :
When called, the stored procedure performs the following steps:
- Tags each record in the Change Notification Transformation Queue table with matching repository, source and destination language with the batchId.
- Returns a result set of the newest translation for each attribute in each record
being translated including the following data:
- repositoryName
- internalRecordId
- attributeName (not the Restricted Name)
- oldTranslatedValue (FUTURE)
- newValue
- changedby
- changedDatetime
- languageExt
- translateLanguageExt
- primary key columns as defined in the B_MASTER_REPOSITORY_ITEM repository (pk1 through pk5)
- descriptive attributes and their values from the referenced repository record
Once post-processing is complete, the original file is transmitted to the Translation Company in the manner defined in the Scheduled Export (e.g., by FTP, network file location, or email). A scheduled import named "CN_Update_Translation_Log" to load the second file is launched to load the second file into the Change Notification Translation Log repository.