5.8.2.1.14.6.  Create XLIFF files with translations / Evaluate XLIFF files with translations

Description:

  • XLIFF(XML Localization Interchange File Format) is an XML-based exchange data format that is used to standardize localization processes.

  • XLIFF exports one file per translated language. Each file has as source language and a target language.

  • Each translation has a translation state. Currently this is either "needs-translation" or "translated" (In version 2.1 "initial" or "translated".).

  • When importing to PARTproject only translations in the "translated" state are read.

  • Launching the respective dialog can be performed in a project's/directory's context menu.

Workflow:

  1. Export the translation files from PARTproject via the context menu command under Translation -> Create XLIFF files with translations [Export XLIFF for translation].

    Export XLIFF for translation

    Export XLIFF for translation

  2. Open the xlf file in a translation editor such as Poedit.

  3. Perform the translation and save the file.

  4. Import the translated xlf files from PARTproject using the context menu command under Translation -> Evaluate XLIFF files with translations [Import XLIFF for translation].

    Only use this function if the files had been exported with the corresponding XLIFF function. The XLIFF version is automatically detected.

    Read XLIFF with translations

    Read XLIFF with translations

    • Only import translations with the status "translated" [Only import translations with status "translated"]: See below in the description of the export options.

Setting options:

The individual setting options in the Write XLIFF with translations dialog box are explained below.

Write XLIFF with translations

Write XLIFF with translations

  • Source directory

    Source directory

    Source directory

    • Directory: The directory or project selected in the project selection [Project selection] is already entered.

    • Include subordinate directories [Include subdirectories]: Not activated by default

  • XLIFF options:

    XLIFF options

    XLIFF options

    • Export directory:

      Export creates multiple .xlf files (one for each target language).

      Via context menu of the input field, you have the following place holders available, which can optionally modify the set path:

      • File name -> <fileName>

      • relative path -> <filePath>

      • relative path short -> <filePathShort>

      • Version -> <version>

      Example: <filePathShort> of the AHP block cylinder is resolved in ahp-blockzylinder-blockzylinder.prj.

    • File name: Structure of the file name. Placeholders are also available here in the context menu of the input field.

      • File name -> <fileName>

      • relative path short -> <filePathShort>

      • Source language -> <srcLang>

      • Target language -> <destLang> : Required if more than one file is exported.

      • Version -> <version> : the set version (i.e. 1.2, 2.0 or 2.1)

      XLIFF files usually end with .xlf.

      Example:

      In the following example, the placeholder "<filePath>" has been added to the export directory [Export directory]. -> The corresponding subfolders are then automatically created in the export directory.

      The names of the xlf files are put together from file path, target language and the XLIFF version.

      Example with placeholders for "Export directory [Export directory] " and "File name [File name] ".

      Example with placeholders for "Export directory [Export directory] " and "File name [File name] ".

    • Version:

    • Encode variable tags ($xxx.) [Encode Variable tags (<xxx>)]: From version 2.0.

      Default: enabled

      Variables such as $NB. are replaced by placeholders. This is very useful as it prevents errors from occurring with references to other columns in the table.

    • Encode HTML tags (<xxx>): From version 2.1.

      Default: enabled

      Similar to Encode variable tags ($xxx.) [Encode Variable tags (<xxx>)].

      HTML-Tags like <h1><p><br> are replaced by placeholders.

    • Notes for the translator: From version 2.0.

      Default: disabled

      Additional information such as the source of the translation is written.

    • Write xml:lang: attribute in the source code. Default value is deactivated.

  • Source language

    Source language

    Source language

    • Any language displayed on the Translation tab page can be selected as the source language. Select this from the list field.

      [Important]Important

      For each catalog, Catalog created [Catalog created in the language] should be set in the language [Catalog created in the language] and default language of the catalog [Default language of catalog]. (XLIFF only supports correctly marked languages. An error message appears if not available)

    • Force internal identifiers as source language: XLIFF makes it possible to export from any source language to any target language.

      This function is only compatible with the current translation system via a workaround. As the existing CSV functions were used for the import, the source language must first be replaced by the base language. This is very time-consuming, but possible if this option is deactivated. If it is activated, the base text is written as metadata for each translation. This means that the base text is used during import instead of the actual translation and the time-consuming conversion from the source language to the base language is no longer necessary.

      Default: enabled

  • Target languages

    Target languages

    Target languages

    • Enable the desired target languages.

    • Write default values as translation suggestion:

      Useful if "Internal identifiers" is selected as the source language. However, the functionality can only be used with some XLIFF editors. Not compatible with option Notes for the translator.

      As of version 2.0.

    • If no translation is available, please write [If no translation is available, write]...

      If during the export there is no translation available for a certain text, the target tag can be configured here.

      • no translation: Do not write a target tag (default)

      • empty translation: Write empty target tag. (<target></target>)

      • Source text: Write source text in the target tag.

      In XLIFF, a translation is valid if the translation state is "translated". The content of the target tag is of secondary importance. There are XLIFF editors, which disregard the translation state.

  • Restrict translations: Activate the desired options.

    Restrict translations

    Restrict translations

    • Project filter:

      • Only visible projects

    • Type filter

      • Standard text

      • Standard name

      • Assembly

      • Modes

      • Custom

      • Variable group

      • Variable values

      • Product page

      • Media(Text)

      • Relation

      • Directory name

      • Catalog name

      • Media(Table)

      • Variable description

      • Classification template

      • Name of installation

      • Standard name

      • Partname

      • Media(Html)

      • Release notes

      • Classification

      • Name of variable

      • Drawings

      • View

      • Standard number

      • Connection-Point

      • BOM name

      • Project value

    • Translation status: The user can select whether they only want to export texts that do not yet have a translation or only texts that have already been translated, which is useful if translations are only to be adapted but no new ones are to be added.

      • All translations (default)

      • Only already translated texts

      • Only missing translations