# Translating HACCP Plans (HACCP)

<a href="/en/gr/576286/">QualityOne Vaults</a> let you create and manage translated versions of finalized <a href="/en/gr/492246/">_HACCP Plans_</a> for local factory use.

HACCP Plan Translation is available for all <a href="/en/gr/16678/">languages supported for Vault UI translation</a>.

Depending on your <a href="/en/gr/771988/">Admin's configuration</a>, object, field, and section labels may appear differently than the labels mentioned in this article.

## HACCP Plan Translation Terminology {#terminology}

This article uses the following terminology to refer to HACCP Plan Translation concepts:

* **HACCP Plan Design**: A model _HACCP Plan_ that factories can copy and translate for local use.
* **Master data object**: A type of <a href="/en/gr/492246/#reference">reference object</a> that defines generic data used to create transactional records across multiple _HACCP Plans_. For instance, users can create _HACCP Plan Process Steps_ using predefined _Process Steps_. See <a href="/en/gr/771988/#standard-md">Configuring HACCP Plan Translation</a> for a list of standard master data objects.
* **Translation companion object**: An object that corresponds to a master data object and that stores translated copies of transactional or master data. See <a href="/en/gr/771988/#standard-md">Configuring HACCP Plan Translation</a> for a list of standard translation companion objects.
* **Transactional object**: An object that stores data for a specific _HACCP Plan_. For instance, _HACCP Plan Process Steps_ represent steps in a specific _HACCP Plan_. Vault copies transactional object records when you <a href="/en/gr/492246/#deep-copy">deep copy a _HACCP Plan_</a> or [generate a translation copy of a _HACCP Plan_][1].
* **Translation copy**: A translated copy of an approved model _HACCP Plan Design_ that factories can copy for local use.

## About the HACCP Plan Translation Process {#process}

The general HACCP Plan Translation process is as follows:

1. [Translate master data][4].
2. <a href="/en/gr/492246/#create-design">Create a _HACCP Plan Design_</a>.
3. [Generate a translation copy of the _HACCP Plan Design_][1].
4. [Export translatable fields on the translation copy of the _HACCP Plan Design_ and edit the translation file][2].
5. [Import translated field data to the _HACCP Plan Design_][3].
6. <a href="/en/gr/492246/#copy-plan">Local manufacturing sites generate _HACCP Plans_ from translated _HACCP Plan Designs_</a>.
7. <a href="/en/gr/492246/#about-comparison-ids">Trace the source of copied _HACCP Plans_ using _Comparison IDs_</a>.

### About HACCP Translation Generation Records {#translation-generation-records}

When you generate a translation copy of a _HACCP Plan_, Vault creates a _HACCP Translation Generation_ record that you can use to track the translation request's progress. After each translation action runs, the record's lifecycle state updates depending on the status of the translation request.

## Translating Master Data {#translate}

In Vaults with HACCP Plan Translation enabled, when users create a record belonging to a master data object, Vault also creates translation copy records for each active <a href="/en/gr/16678/">language supported for UI translation</a>. If configured by your Admin, you can access translation records from a related object section on each master data record. See <a href="/en/gr/771988/#standard-md">Configuring HACCP Plan Translation</a> for a list of standard master data objects and their corresponding translation companion objects.

The following behavior applies to translation companion objects:

* Translation companion records have the same object type as their corresponding master data record.
* When you delete master data records, Vault deletes their corresponding translation companion records. This behavior is subject to a [limitation][7].
* When you change the _Status_ of master data records from _Active_ to _Inactive_ and vice versa, Vault updates the _Status_ of the corresponding translation companion records. This behavior is subject to [limitations][6].

Your Admin must configure the behavior described above if your Vault uses <a href="/en/gr/771988/#define-custom-objects">custom master data objects</a>.

To upload translated master data for standard and custom master data objects, use <a href="/en/gr/26607/">Vault Loader</a> or contact your Veeva Representative to set up an automated process.

We recommend you set up a process for tracking and maintaining master data for your organization. For instance, setting up a spreadsheet to track when each master data record is updated.

The following actions can be used as part of a translation process for transactional data only and cannot be used for master data:

* _Export Translatable Fields_
* _Generate Translation Copy_
* _Import Translatable Fields_

Your Admin can configure master data from translation companion records to display in the <a href="/en/gr/771988/#details-section">_Details_ section</a> and in <a href="/en/gr/771988/#related-object-section">related object sections</a> of object records. The HACCP Flow Diagram displays available translated master data automatically. Translated master data displays on object records and the HACCP Flow Diagram either according to the user's language settings or the _HACCP Plan_ language. For a seamless experience, the language setting on user profiles should match the _HACCP Plan_ language.

## Generating a Translation Copy of a HACCP Plan {#generate}

When the _Generate Translation Copy_ action runs, Vault creates translation copies of the source _HACCP Plan_ record and each record belonging to the structure of related records in the _HACCP Plan_.

To generate a translation copy of a _HACCP Plan_:

1. Navigate to **Business Admin > Objects > HACCP Plans** and select a **HACCP Plan** to translate.
2. From the **All Actions** menu, select **Generate Translation Copy**.
3. Select the **Language**. Only languages available in your Vault are displayed in the picklist.
4. Click **Continue**.

After the _Generate Translation Copy_ action runs, Vault sends a notification and creates a _HACCP Translation Generation_ record. If the copy was successfully generated, Vault sets the _HACCP Translation Generation_ record's lifecycle state to _Ready for Export_. If there were errors during the copy, Vault sets the _HACCP Translation Generation_ record's lifecycle state to _Initiated_.

## Exporting a HACCP Plan for Translation {#export}

After generating a translation copy of a _HACCP Plan_, you can export and download all translatable fields in a _HACCP Plan_ and its transactional records. Vault exports the following field types for translation:

* _Long Text_
* _Text_
* _Rich Text_

To export a translation copy of a _HACCP Plan_ for translation:

1. Navigate to the **[translation copy][1]** of the _HACCP Plan_ you wish to translate.
2. From the **All Actions** menu, select **Export Translatable Fields**.
3. Download and open the generated file.
4. In the file, you can view and update all fields available for translation and any existing translations for the selected language. 
5. When done, save the file. While editing, only execute Save on the file and do not use Save As to save the file in a different location or save it as a native file. To move or rename the file, use your operating system, rather than your text editing software's Save As option.

After successfully exporting the _HACCP Plan_, Vault sets the corresponding _HACCP Translation Generation_ record to _Export Complete_.

## Importing a Translated HACCP Plan {#import}

To import translated field data for a _HACCP Plan_:

1. Navigate to the **translation copy** of the target _HACCP Plan_.
2. From the **All Actions** menu, select **Import Translatable Fields**.
3. Click **Choose File** in the dialog and upload the updated JSON file. 
4. Click **Submit**.

Vault sends a notification when your translation file finishes importing. If import is successful, Vault updates all translatable fields with the translations included in the JSON file, and moves the _HACCP Translation Generation_ record associated with the _HACCP Plan_ to the _Import Complete_ lifecycle state.

### About JSON File Validation {#validation}

During import, Vault validates the JSON file and notifies you of any errors and the lines on which they appear. Incorrect formatting, invalid syntax, and inaccurate data may cause file upload or import failure. For instance, uploading a translation file for the incorrect _HACCP Plan_ causes file import to fail. We recommend only modifying the exported JSON translation file to add the relevant translated field values and not editing the metadata in the file. For instance, file import fails if the file contains translations for unsupported fields. Only _Text_ fields on transactional objects are supported for translation. Object reference fields on transactional objects that refer to master data objects must be [translated][4] from the master data object's translation companion object.

## Limitations {#limitations}

The following limitations apply to HACCP Plan Translation:

* Vault cannot export and import translation files if the JSON file size exceeds 250 MB.
* Translated data from the _Material_ object can be configured to display only in the _HACCP Plan Materials_ section of _HACCP Plan_ records.
* <a id="deletion-limitation"></a>When creating or deleting master data records in batches, creation or deletion fails for all records in the batch if the total number of related translation companion records exceeds 7,500. In these cases, reduce the number of master data records in the batch and try again. In Vaults with all 19 supported languages active, you can create or delete up to 394 master data records at once.
* Translated master data displays only on configured object record pages and on the HACCP Flow Diagram. In other areas of Vault such as Saved Views, Reports, and Search, translated master data may not be available.
* Vault does not sync translation companion records to match the _Status_ of their corresponding master data record in the following cases:
    * If the translation companion object has a lifecycle.
    * If the master data object is a parent object. This limitation does not apply to the _Risk Matrix_ object.
    * If your Vault contains more than 100 _Risk Matrix_ records, the _Status_ of _Risk Matrix Translation_ records won't be synced.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: To configure synchronization of the <em>Status</em> of master data records to their corresponding translation companion records in any of the above instances, contact your Veeva Representative.</p>
    </div>
  </div>
</div>



[1]: #generate
[2]: #export
[3]: #import
[4]: #translate
[5]: #terminology
[6]: #limitations
[7]: #deletion-limitation