Export Content from Your LWR Site for Translation

After you add a language to your site, you can export the site content to send it to your localization team or vendor for translation.

If you exported your site content before Summer ’22, export it again to ensure that you and your translator are working with the most recent version of the .xlf format. You can’t upload older versions of the .xlf format to your site.

Note

LWR site content exports in an .xlf file, the standard format that’s compatible with third-party translation software. Content in your site’s original default language is contained within the <source> tags. Translated content goes within the <target> tags. This excerpt from an .xlf file shows content in English (US), the default site language, along with its French translation.

<segment id="title">
     <source>Subscribe to our newsletter!</source>
     <target>Inscrivez-vous à notre newsletter!</target>
    </segment>
 <segment id="headline">
     <source>We'll send you our latest news.</source>
     <target>On vous apporte nos dernières nouvelles.</target>
    </segment>
 <segment id="description">
     <source>No need to search. Get all our news every week in your mailbox.</source>
     <target>Plus besoin de chercher. Recevez toute notre actu chaque semaine dans votre boîte mail.</target>
    </segment>
  1. In the Settings panel in Experience Builder, select Languages.
  2. In the Languages panel, click Export Content.

    The exported file doesn’t include CMS content or the items in your site’s navigation menu. Translate the CMS content in your CMS Workspace in the Digital Experiences app. Use Translation Workbench to translate the items in the site’s navigation menu.

  3. In the Export site content window, select the language that you want to export. Optionally, enter a name for the .zip file, such as the name of the language that you’re exporting.

    You can export more than one language at a time. All languages export in one .zip file, but within the .zip file each language is in its own .xlf file.

  4. Click Export.

    After you export your site content for translation, avoid updating the text in your default language because the translation is based on the earlier (pre-updated) version of the content.

    Note

The .xlf file includes the translatable component property values—the properties that are defined as translatable=“true” in the component’s js-meta.xml file. However, the file excludes empty String values, even if they’re marked as translatable, because those properties contain no text to translate.

If you use the HTML Editor component or add SEO head tags to your site, the .xlf file also includes their text, which is in HTML. The exported file includes the HTML tags because these tags sometimes include attributes that need translation, such as placeholder text. For example, an email field where site visitors can enter their email address can look like this in the .xlf file:

&amp;lt;input type=”email” value=”” placeholder=”Enter your email address” name=”contact[email]” id=”Email-footer” class=”newsletter-form-group__input”&amp;gt;

Translators must be familiar enough with HTML tags to know what to translate and what to leave alone. In this case, the only part to translate is Enter your email address.