---
schema_version: "1"
id: 7663af01ca92278fa5b50a63029ccd5196d56ea47182acec24cb0b9ca19022fe
title: Configure Multi-Language in OmniOut for Omniscripts (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_configure_multi_language_in_omniout_for_omniscripts.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_configure_multi_language_in_omniout_for_omniscripts.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fb8adbb6ff43eb5c96c097c01d64ac49713ec4b0a72282cb347553cdc2309c2e
description: For the managed package runtime, display multi-language Omniscripts in OmniOut using custom labels. Access custom labels in your Omniscript directly from Salesforce or use custom labels defined in local files. Control which language displays by using a language code.
products:
  - Omnistudio
release: "264"
---
# Configure Multi-Language in OmniOut for Omniscripts (Managed Package)

For the managed package runtime, display multi-language Omniscripts in OmniOut using custom labels. Access custom labels in your Omniscript directly from Salesforce or use custom labels defined in local files. Control which language displays by using a language code.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

The language code searches locally defined language files or a Salesforce connection to access a language's custom labels. If the Omniscript component tag's run-mode attribute is present and set to localScriptDef, the Omniscript uses the locally defined custom labels. If run-mode isn’t present, the Omniscript accesses the custom labels through a Salesforce connection.

Before You Begin

1. Create a multi-language Omniscript. See [Create Multi-Language Omniscripts (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_create_multi_language_omniscripts.htm&release=264.0.0&type=5 "For the managed package runtime, allow a single Omniscript to run in multiple languages using Salesforce custom labels.").
2. Add your multi-language Omniscript to an OmniOut LWC. See [Add an Omniscript Lightning Web Component to OmniOut (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_add_an_omniscript_lightning_web_component_to_omniout.htm&release=264.0.0&type=5 "For the managed package runtime, download and configure an Omniscript to use it off-platform in OmniOut. Download your Omniscript LWC from the LWC Omniscript Designer, add the component folder to the OmniOut project, and configure files for HTML and CSS.").
3. View Salesforce language codes. See [Translations](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_translations.htm) (Salesforce documentation).

1. After adding your multi-language Omniscript to OmniOut, in the VSCode command line, enter this command, and replace **LANGCODE** with a Salesforce language code:
    
    ```
    npm run customlabels LANGCODE
                   
    ```
2. View these two generated files:
    
    LANGCODE.translations.js: contains all of the custom labels, both user-defined and out-of-the-box, in a single file. The language code replaces the LANGCODE property used in this example file name.
    
    translations.js: contains the exports of all different translations for all of the custom labels.
3. In each LANGCODE.translations.js file, add the translated labels for that language.
    
    The translated labels aren't downloaded as part of the npm command.
    
    For example, a fr.translations.js file has text for these two labels in English.
    
    ```
    export const FR = {
      "OmniStepValidationError": "Please fix all the fields with errors.",
      "OmniValidationBadInput": "Enter a valid value.",
       ...
    }
    ```
    
    In this example, the English text is manually replaced with the French labels.
    
    ```
    export const FR = {
      "OmniStepValidationError": "Veuillez corriger tous les champs contenant des erreurs.",
      "OmniValidationBadInput": "Entrez une valeur valide.",
       ...
    }
    ```
4. In translations.js, uncomment export lines to include them when the Omniscript is running.
    
    ```
    export * from "./es.translations.js";
    ```
5. Pass the language code using a combination of these two options:
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    If both options are present, the component tag property overrides the URL parameter.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d98131e188">
                  <p style="margin-bottom:0;">Language Code Option</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d98131e194">
                  <p style="margin-bottom:0;">Description</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d98131e200">
                  <p style="margin-bottom:0;">Example</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Language Code Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d98131e188 ">
                  <p style="margin-bottom:0;">Component Tag Property</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d98131e194 ">
                  <p style="margin-bottom:0;">Passes the language code in the Omniscript's component tag as a prefill property.</p>
                </td>

                <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d98131e200 ">
                  <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>&lt;my-omniscript prefill='\{<strong class="uicontrol">"LanguageCode":"iw"</strong>}'&gt; &lt;/my-omniscript&gt;</code></pre>
                </td>

              </tr>
              <tr class="">
                <td data-label="Language Code Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d98131e188 ">
                  <p style="margin-bottom:0;">URL Parameter</p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d98131e194 ">
                  <p style="margin-bottom:0;">Append the LanguageCode parameter to your URL endpoint and enter a Salesforce language code.</p>
                </td>

                <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d98131e200 ">
                  <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>localhost:4002/myOmniScript?<strong class="uicontrol">LanguageCode=en_US</strong>
                              </code></pre>
                </td>

              </tr>
            </tbody>
          </table>
6. (Optional) In the Omniscript component tag, add the **run-mode="localScriptDef"** attribute to force the Omniscript to use the locally defined custom labels. If run-mode isn’t present, a connection is made to retrieve the custom labels from Salesforce.
7. (Optional) If you’re using **run-mode="localScriptDef"** in your Omniscript component tag, you must define custom translations for each language manually.
    
    To define your custom labels:
    
    1. In OmniOut, select a **LANGCODE.translations.js** file.
    2. In your file, locate a key-value pair, and in the value field, enter the translation for that custom label. Repeat this process for each custom label.
        
        ```
        export const es = {    
            "New": "Nuevo"
        }
        ```
8. (Optional) Test the multi-language Omniscript In the command line:
    
    1. In the command line, enter and run the command `npm run watch`.
    2. Click the localhost link that appears in the command line.
    3. In your browser, edit the URL to include a language code.
        
        ```
        localhost:4002/myOmniScript?LanguageCode=en_US
                             
        ```

What’s next: [Run OmniOut in Development Mode (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_run_omniout_in_development_mode.htm&release=264.0.0&type=5 "For the managed package runtime, view and test your Omniscript and Flexcard before adding it to your application by running it in development mode. Use a jsForce connection to request data from your org.").