Application translation
You can translate the text in Datacap applications that is displayed in Datacap clients: Datacap Desktop, FastDoc (Job Monitor only), and Datacap Navigator. The following text can be translated: workflow names, job names, task names, shortcuts, descriptions, field names, document types, page types, and validation error messages.
Translation resource files
Translated text is defined in resource files and substituted by Datacap clients. All Datacap clients share the same translation resource files. The resource files, named resources.json, are stored in the DCO application folder, for example: C:\Datacap\MyApplication\dco_MyApplication\resources.json.
- dco_application\locale\resources.json
- dco_application\language\resources.json
- dco_application\resources.json
language is in "ll" format, where "ll" is a two-character language code (for example, en).
Resource file format
{
“key1” : “value1”,
“key2” : “value2”,
…
“keyN” : “valueN”
}
Each key consists of a type and name as follows: type.name
workflow
task
job
jobdescription
shortcut
shortcutdescription
doctype
pagetype
field
message
name refers to the name of the object.
"field.ItemDesc":"Item description"
For more examples, see the sample resource files that are installed with the TravelDocs application in C:\datacap\TravelDocs\dco_TravelDocs.
- Keys are case-sensitive. The name must match the name of the object. For example, job.Main Job is not the same as job.MainJob.
- Field objects can have a label property. If translation text is defined for
that field in a resource file, the translation text is displayed instead of the label text.
Precedence is given to display text as follows:
- Resource value
- Label value
- Name or ID
- If you are using Datacap Navigator, reload the page in the browser to see your changes.
Message translation
The key for a message resource is message.MsgID, where MsgID is a unique ID that you define to store the message by using the MessageID action. To display a message, the client searches the message object for the MessageID variable. If the variable is not found, the message that is found in the MESSAGE or ErrorMessage variable is displayed without modification. If MessageID is found, the translated message is retrieved from the resource file. Substitution parameters that were provided to the action are replaced in the translated message. The client can also translate substitution parameters by using one of the translated object types such as job, task, or field.