Skip to main content
A localized Document Definition is a Document Definition that has been translated into a language other than the one in which it was originally created. When installing ABBYY FlexiCapture, you can select a UI language. If a Document Definition is available in the selected UI language, FlexiCapture uses this localized version. When localizing a Document Definition, the following items are translated:
  • Field captions, buttons, and text in the data form
  • Field names in the dialog box where data set records are added and edited
  • Field names in the dialog box where the vendor linked to a training batch can be changed
  • Field captions displayed to the user when specifying regions that were not detected automatically
  • Field captions in the database lookup dialog box invoked from the document editor
  • Column names in the drop-down list displayed in the database lookup dialog box
  • Rule names displayed to the operator when rule errors occur
  • User script messages (for example, messages displayed by script rules, export settings, and event handlers)
A user editing a Document Definition always works with the original unlocalized values. An operator working in the document editor sees the localized values displayed in the language of the operator’s UI.

The localization process

Document Definitions are localized in three stages:
  1. The identifiers of strings that need to be localized are exported to a text file.
  2. Localized text is provided for each string identifier in the text file.
  3. The localized text and its corresponding identifiers (collectively referred to as the localization) are imported from the text file into the Document Definition.
The localization is only imported into a Document Definition that contains strings with the identifiers used in the localization.

The localization file

The localization file is a TXT file that contains a list of localized strings. Strings in this file are sorted according to the type of interface element in which they appear (field names, Document Definition name, shell messages, and script messages), and then alphabetically by name. The Localization Options dialog box contains controls for creating and managing localization files. Example of a string in a localization file that has not been translated yet:
In this example, BANK_CODE is the identifier of the string. No other field in the Document Definition can have the same identifier. This identifier is generated automatically in one of two ways: based on the name of the field, or using the template FC_<number of the field>. The identifier is followed by a comma, which is followed by the string that is displayed to the user, enclosed in quotation marks (Bank code). This string is the part that is translated during localization. When the string is translated and imported back into the Document Definition, a comment delimiter (two slashes) followed by the original string (Bank Code) is automatically added after the localized string. The original string is the default string displayed to users editing the Document Definition. The string above looks as follows when localized to Russian:

Localization file syntax

Localize a Document Definition with a localization file

Create a localization file

1

Open Localization Options

In the Document Definition editor, click Document Definition → Localization → Localization Options.
2

Select a language and export

Select a language for which you want to create a localization file (languages without a localization file have the Nonlocalized status), and click the Export button.
3

Save the file

In the dialog box that opens, specify the folder and file name for the localization file.

Edit a localization file

1

Translate the strings

Open the localization file in a text editor and translate the strings.
2

Save the file

Save the file. Make sure it is encoded in Unicode.

Import a localization file into a Document Definition

1

Open Localization Options

In the Document Definition editor, click Document Definition → Localization → Localization Options.
2

Select a language and import

Select the language for which you want to import a localization file, and click the Import button.
3

Specify the file

Specify the path to the localization file in the dialog box that opens. The status of the language changes to Localized.
4

Save the Document Definition

Save the Document Definition.
After a localization file is imported, the data form in the Document Definition editor still contains default (unlocalized) text. The localized text appears only in the document editor. Users of the Project Setup Station can view localized text only when testing Document Definitions, and only if the localization’s language is selected as the interface language of ABBYY FlexiCapture. If a localized string is longer than the original, fields on the data form move to accommodate it.

Delete a localization

1

Open Localization Options

In the Document Definition editor, click Document Definition → Localization → Localization Options.
2

Select the language

Select the language of the localization you want to delete. Languages with an available localization have the Localized status.
3

Delete the localization

Delete the localization. The status of the language changes to Nonlocalized.

Localize messages from user scripts

You can localize messages from user scripts, such as messages from script rules and event handlers. Localized script messages are displayed when the corresponding interface language is selected in ABBYY FlexiCapture.
1

Create message identifiers

In the Document Definition editor, click Document Definition → Localization → Localizable Script Messages. In the dialog box that opens, click Add to create an identifier for each message and set its default text. Use Edit to change a message or Delete to remove one.
2

Provide localized text

Click Document Definition → Localization → Localization Options to export the messages to a localization file. Translate the messages, and then import the localization file as described in Import a localization file into a Document Definition.
3

Reference the identifiers in your script

Reference the message identifiers in the script’s code. For more information, see Call localized messages from scripts.

Call localized messages from scripts

To call a message from a user script, use the FCTools.LocalizedStrings object. This object uses the IProperties method. The following code sample returns a localized message that has the identifier MY_MESSAGE_1: