Translating Web Content

Liferay DXP/Portal 7.3+

Liferay provides integrated tools for translating web content articles, so you can create engaging, localized content for your global users. With these tools, you can manually translate web content or import translations as XLIFF files.

If desired, you can enable a custom workflow to direct the review and publishing process for translations.

Note

The languages available for translation are determined by your instance’s localization settings. See Initial Instance Localization and Virtual Instance Localization for more information.

Manually Translating Content

Note

To translate web content manually, users must have either View and Update permissions for the asset or Translation permissions for one or more languages. See Managing Permissions for Translation for more information.

Use the translation interface in the web content article’s action menu, or translate its fields while creating/editing one.

Manually Translating Web Content Articles Using the Translation Interface

  1. Open the Site Menu (Site Menu), expand Content & Data, and go to Web Content.

  2. Select the Web Content tab. Click Actions (Actions icon) for the content you want to translate, and select Translate.

    The translation interface appears, where you can view the content’s original text alongside your translation.

    The left column displays the language you’re translating from, and the right column provides editable fields you can use for your translation.

    Selecting translate redirects you to the translation interface.

  3. Select the language you want to translate.

    Important

    Users with content Update permissions can translate the original text into any language.

    Users with Translate permissions can only translate the origin text into languages for which they have permission.

  4. Enter your translation for the available fields.

    Note

    The friendly URL for translations remains empty unless filled in by the user. If the friendly URL is left empty, the default language’s friendly URL is used.

  5. Click Publish to create a new version of the web content article or initiate a workflow, if it’s enabled.

    Alternatively, click Save as Draft to save and publish your translation later.

    Use the translation interface to translate your web content article.

Manually Translating Web Content Articles During Creation/Edition

Liferay DXP 2024.Q1+/Portal 7.4 GA112+

Important

Currently, this feature is behind release feature flags (LPS-114700 and LPD-11253). Read Release Feature Flags for more information. Other features may differ without these feature flags.

Note

Liferay DXP 2024.Q3+/Portal 7.4 GA125+

(Breaking Change) Content is no longer classified as Translated based only on the title. Now, it’s marked as Translating when any field is translated. It’s considered translated only when all fields are translated.

  1. Create or start editing web content.

  2. On the editing page, click the flag icon + language code in the upper left corner to see available languages and their translation statuses.

    There are three available statuses: Not Translated, Liferay DXP 2024.Q2+ Translating, and Translated.

    Liferay DXP 2024.Q2+ The Translating status shows two numbers: the number of translated fields and the total number of fields. It appears as a badge next to the selected language. Once all fields are translated, the badge changes to Translated.

    The Translating status shows the number of translated fields and the total number of fields.

    Liferay DXP 2024.Q3+/Portal 7.4 GA125+ A “The Description will not count as a translatable field” message appears under the fields, distinguishing which fields are translatable. In the image below, the Title counts as translatable, but the Description and the Friendly URL do not.

    Distinguish which fields count as translatable.

    Tip

    If you didn’t define the field as Localizable, the field and its localization are disabled when translating the web content article.

  3. Choose a language and translate the fields.

  4. (Optional) Liferay DXP 2024.Q3+/Portal 7.4 GA125+ While translating fields, display only Translated, Untranslated, or All Fields by clicking on All Fields next to the flag icon in the upper left corner and selecting an option.

    Display only translated, untranslated, or all fields.

  5. (Optional) Liferay DXP 2024.Q3+/Portal 7.4 GA125+ If there are fields that don’t need translating, but you want to change the translation status to Translated, click Actions (Actions icon) next to the flag icon in the upper left corner and select Mark as Translated (Mark as Translated icon).

    Note

    Once marked as translated, the status is not reverted even if you undo changes. To reset the translation, click Actions (Actions icon) next to the flag icon in the upper left corner and select Reset Translation (Reset Translation).

    Be aware that once you reset the translation, all translated fields are deleted and the action cannot be undone.

    Use the Mark as Translated and Reset Translation to change the translation status.

  6. Publish or save the article as a draft to save the modifications.

Note

When adding a new repeatable fieldset to a web content article with existing translations, changes to the default content don’t propagate to translations automatically. This prevents unintended overwriting of already translated content.

Translating Web Content Articles Using Third Party Services

If you’ve enabled Liferay’s Google Cloud Translation, Amazon Translate, or Microsoft Translator integration, you can use them to translate web content automatically. See Using Third Parties for Translation for more information.

Exporting and Importing Translations

Note

To translate content page experiences manually, users must have View and Update permissions for content pages or Translation permissions for one or more languages. See Managing Translation Permissions for more information.

With Liferay, you can export web content for translation as .xliff or .xlf files. You can send these files to translators and then import the translations together as a .zip file or individually as .xliff or .xlf files.

Important

Liferay supports both XLIFF 1.2 and 2.0 files. However, it may not support all features and capabilities those formats provide.

Exporting Content for Translation

  1. Open the Site Menu (Site Menu) and navigate to Content & DataWeb Content.

  2. Click Actions (Actions icon) for the content you want to translate and select Export for Translation. This opens a modal window for configuring your export.

    Select Export for Translation.

    Liferay Portal 7.4 GA26+ You can also select multiple articles and click the Export for Translation button.

    Select multiple articles and click Export for Translation

  3. Select an export format: XLIFF 1.2 or XLIFF 2.0.

  4. Select the web content’s original language.

  5. Select the languages you want to translate to.

    Select the languages you want to translate the content into.

  6. Click Export.

Liferay generates a ZIP archive that contains an XLIFF file for each selected language. You can then use these files with compatible translation software.

Importing Content Translations

  1. Open the Site Menu (Site Menu) and navigate to Content & DataWeb Content.

  2. Click Actions (Actions icon) for the translated web content and select Import Translation.

    Select Import Translation.

    Liferay Portal 7.4 GA26+ You can also import translations for multiple articles at once by clicking the Actions button (Actions Button) in the Application Bar and selecting Import Translations.

    Upload translations for multiple articles.

  3. Select the .xliff, .xlf, and .zip files you want to import.

    Select the translation files you want to import.

    Important

    While Liferay supports importing XLIFF files created using the Export for Translation action, it cannot guarantee the successful import of files generated by other means.

  4. Click Publish.

    If successful, Liferay displays a success message with the imported files. The web content is updated with all changes included in the translation files. If workflow is enabled, this change must be approved as with other content updates.

    If successful, Liferay displays a success message with the imported files.

    However, if errors occur during import, Liferay notifies you of the failing files and provides a downloadable CSV error report.

    If errors occur during import, Liferay notifies you of the failing files and provides a downloadable CSV error report.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy