Translations

JLPTEI supports multilingual original texts and multilingual translations of the original texts.

=Prerequisites=

Conditional variable
Each translation must define a conditional variable to indicate to a processor whether the translation should be included. The condition must be a two-way switch, with valid values YES and NO. YES indicates that the translation is included, NO that it is not.

Statement of purpose
There are numerous styles of translation. It is strongly recommended (and required for translations in the core distribution) that a translation have its own statement of purpose. This statement should indicate whether the translation is intended to be idiomatic, creative, literal, etc.

=Translation files=

Translation files must meet all the requirements of other files. They must have a header, and they must have at least one text section. The base URI of translation files is http://jewishliturgy.org/base/text/translation/LANG/TRANSLATION_NAME/FILENAME. If necessary, translations may define their own conditionals in addition to those used in the original text.

LANG is the language code in which the translation is written. TRANSLATION_NAME is the name of the translation. FILENAME may be the same as the filename of the original text.

The translation text itself is stored in a JLPTEI file with concurrent hierarchies, in the same way as original text.

Forward linkage to translated text
Translations are generally stored in a different file from their original texts, and, in general, each file of original text may have any number of translations. In order for the translation to be processed, each translation must have one or more special support files, each of which contains links between the translation files and the files they translate. The links should be be under the conditional control of the translation's associated conditional variable.

These forward linkages are made using links of the form:

Linkage
Translations may be aligned to arbitrary positions in a selection by using a parallel hierarchy in a translation linkage file. The translation linkage file contains a special j:concurrent parallel hierarchy, which includes:
 * At least two selections incorporated by reference, using tei:ptr[@type='selection']
 * One j:view[@type='parallelGrp'] view, which contains:
 * One or more j:parallelGrp tags, each containing:
 * One j:original tag, which includes singular or ranged references into the selection.
 * One j:parallel tag, which includes the parallel text or references to the parallel text.

Selection pointers
Each selection pointer has the form:

The FILE_UNIQUE marker is used to tell which parallel chunks (either j:parallel or j:original) are linked to which selection.

Generality
The method used for encoding translations may be used for any parallel-aligned text.