Skip to content
Joel Lonbeck edited this page Feb 12, 2016 · 52 revisions

The Translator manages all the ts.Translator.TargetTranslations in the application.

##Interface

String compileTranslation(String text)

Compiles all the special formatting code (used for display to the user) back into the proper translation format e.g. USX, USFM.

TargetTranslation createTargetTranslation(TargetLanguage targetLanguage, String projectId)

Creates a new target translation on the disk

void deleteTargetTranslation(String targetTranslationId)

Deletes a target translation from the disk

void export(TargetTranslation targetTranslation, File outputFile)

Exports a target translation as a tStudio Archive to the output file specified.

Note: The export archive will only include the target translation. No source translations will be included in the export.

TargetTranslation getTargetTranslation(String targetTranslationId)

Returns a target translation if it exists

TargetTranslation getTargetTranslation(String targetLanguageId, String projectId)

Returns a target translation if it exists

TargetTranslation[] getTargetTranslations()

Returns an array of all target translations on the disk

##Translator Root Directory Structure The translator will store all target translations (see ts.Translator.TargetTranslation) in a single directory. For example:

uw-obs-de/
uw-gen-fr/
...

##Exporting (Human Readable) When exporting target translations there are a few guidelines to follow:

USFM reference can be downloaded as a PDF. General information and additional file formats can be found at http://paratext.org/about/usfm.

##Exporting (Backups) For exporting a target translation into a machine readable format see https://github.com/unfoldingWord-dev/ts-requirements/wiki/tStudio-Archive

##Importing See Importing a Target Translation.