---
schema_version: "1"
id: 93c8d9fe5faa64dbde230eb675db7b08cf884d23e9aa4083c36ab0f43e8a8f4c
title: Translating the Industries Cart UI
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_translating_the_vlocity_cart_ui.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_translating_the_vlocity_cart_ui.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 47ba8f98a9b96537b917db8fdfa2512c840678acf6d6daa59f9dafe04e268bc8
description: You can translate the field labels, headers, and other UI elements of the Industries Cart using a custom language file.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Translating the Industries Cart UI

You can translate the field labels, headers, and other UI elements of the Industries Cart using a custom language file.

To translate the cart UI:

1. Enable a translation file:
    
    - Go to Setup.
    - In the Quick Find box, type Translation Workbench.
    - From the search results, click Translation Settings.
    - Click **Enable**, if it is not already selected.
2. Add a new (supported) language. See [Vlocity Locale Codes](https://help.salesforce.com/s/articleView?id=ind.comms_vlocity_locale_codes.htm&release=264.0.0&type=5 "This table lists the Vlocity locale codes that you can activate for translating label names. This is an out-of-the-box list that Salesforce provides. You can activate only three locale values at a time. See Activating Vlocity Locale Code Values").
    
    - On the Translation Settings page, click **Add**.
    - From the **Language** drop-down list, select the language you wish to add, for example, English.
    - To assign a user as a translator for the selected language, select the user in the **Available List** , and add the user to the **Selected List**.
    - Ensure that the **Active** field is checked.
    - Click **Save**.
3. Export the language file:
    
    - Go to **Setup**.
    - In the Quick Find box, type Translation Workbench.
    - From the search results, click **Export**.
    - Select **Untranslated** and click **Export as STF**.
        
        You will be notified by an email when the export is complete.
    - Follow the link in the email.
    - In the **Recent Documents** section, click the document named `Untranslated_timestamp.zip`.
    - Click **View file** to download the file.
    - Unzip the `.zip` file.
4. Create translations:
    
    You can create translations by entering a command or by using a Python script.
    
    - In your terminal, navigate to the folder containing the downloaded `.stf` file.
        
        Use sed $'s/\\t/&amp;\*\*/g' source.stf > output.stf command.
        
        This command appends \*\* before each string value.
        
        Example: sed $'s/\\t/&amp;\*\*/g' Untranslated\_iw\_2018-03-09\\ 0112.stf > Translated.stf
        
        Open the `Translated.stf` file and verify that there are \*\* before each label.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)
        
        Note
        
        Before importing the `Translated.stf` file, open the file and shorten the field labels if they are longer than 40 characters, for example, 'OverriddenAttributeAssignmentCategoryId', 'OverriddenOfferPricingComponentId'. Remove some characters from the label names, if not the import will fail due to 40 characters limitation. If the labels are already 40 characters long, adding \*\* will make their length to be 42 characters causing the import to fail.
    - Alternatively, you can use the following Python script to create translations:
        
        ```
        ------------------------------------------
        import sys
        
        # Take two files as input (the last one might not exist if it does exist the content is appended. 
        #The first file represents the input file with un-translated strings. 
        #The second one represents the output file where the translations will be written.
        ## 
        #The translation process consists of taking strings of the form:
        # ButtonOrLink.vlocity_cmt__Application__c.vlocity_cmt__Review	Review
        #and converting them to:
        # ButtonOrLink.vlocity_cmt__Application__c.vlocity_cmt__Review	**Review
        #
        # by adding "**" after the tab.
        # 
        #In the case that after the translation a string is longer than 40 characters (and its key contains '.FieldLabel')
        # then the last characters are removed.
        
        def main():  
          
            input = sys.argv[1]    
            output = sys.argv[2] 
         with open(input, 'r') as input_file:  
              
                for line in input_file:   
                 
                    line = line.strip()            
                    if '\t' in line:                
                        line = line.replace("\t", "\t**") 
                       
                        line = removeExtraCharacters(line)  
                  
                    with open(output, 'a') as output_file:                
                        output_file.write(line + '\n') 
        def removeExtraCharacters(input):  
          
            if '.FieldLabel' not in input:        
                return input    
        
            keyValuePair = input.split('\t')    
            key = keyValuePair[0]    
            value = keyValuePair[1]  
          
            length = len(value)    
            if length <= 40:        
                return input    
            else:        
                value = value[:40]        
                output = key + '\t' + value        
                return output
        
        
        if __name__ == '__main__':    
            main()
        ------------------------------------------------
        ```
5. Import the translated file:
    
    - In the Quick Find box, type Translation Workbench.
    - From the search results, click **Import**.
    - Click **Choose File**.
    - Select the file you edited for translations.
    - Click **Import**.
6. Change the language in your org:
    
    - In the **Search Setup** box, type in your user account name.
    - Click **Edit**.
    - Scroll to the **Locale Settings** section and set the **Locale** and **Language settings**.
    - Click **Save**.
        
        Now, most labels on your org render in the selected language. However, note that you cannot translate Tabs, Objects, and Record names. The label for the 'name' field in every Salesforce object must be translated manually as Salesforce needs grammatical information.
7. To translate labels manually:
    
    - Go to the Quick Find box and type Rename Tab and Labels.
    - Select Rename Tabs and Labels from the search results.
    - From the **Select Language** drop-down list, select the language you want to rename the labels into. The labels are translated and are displayed in the **Display label** column.

- **[Vlocity Locale Codes](https://help.salesforce.com/s/articleView?id=ind.comms_vlocity_locale_codes.htm&release=264.0.0&type=5)**  
    This table lists the Vlocity locale codes that you can activate for translating label names. This is an out-of-the-box list that Salesforce provides. You can activate only three locale values at a time. See Activating Vlocity Locale Code Values