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.

Application translation is optional. If an application is not translated, or if no default translation is provided and the client’s locale or language resource is not found, the application continues to work as expected. Ideally, a translated application should have a resource file in its DCO application root folder to provide a default, but this is not a requirement.

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.

You can create subfolders for translation into multiple languages. Datacap clients look for translation resource files in the following order:
  1. dco_application\locale\resources.json
  2. dco_application\language\resources.json
  3. dco_application\resources.json
locale is in "ll-cc" format, where "ll" is a two-character language code (for example, en) and "cc" is a two-character country code (for example, us).

language is in "ll" format, where "ll" is a two-character language code (for example, en).

Resource file format

The translation resource files contain key-value pairs in the following format:
{
	“key1” : “value1”,
	“key2” : “value2”,
	…
	“keyN” : “valueN”
}

Each key consists of a type and name as follows: type.name

type can have one of the following values:
workflow
task
job
jobdescription
shortcut
shortcutdescription
doctype
pagetype
field
message

name refers to the name of the object.

For example, you can define translation text for an ItemDesc field as follows:
"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.

Important:
  • 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:
    1. Resource value
    2. Label value
    3. Name or ID
    The display precedence applies to fields on Verify panels, the Start Batch panel, and the Edit Batch Properties panel.
  • 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.