Translating Content Pages
Liferay 7.4 U15+ and GA15+
Liferay provides integrated tools for translating content pages, so you can create engaging, localized experiences for your global users. With these tools, you can translate content page experiences manually or import translations from XLIFF files.
When translating a content page, users can only translate a page’s name and inline fragment text (e.g. HTML, Header, etc.). They cannot translate widgets or mapped fragment fields.
If desired, you can enable a custom workflow to direct the review and publishing process for translations.
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 Pages
To translate content page experiences manually, users must have either View and Update permissions for content pages or Translation permissions for one or more languages. See Managing Translation Permissions for more information.
Follow these steps to translate content page experiences manually:
-
Open the Site Menu (), expand Site Builder, and go to Pages.
-
Click Actions () for the content page you want to translate and select Translate.
This redirects you to the translation interface, 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.
-
Select the experience and language you want to translate.
Users with Page 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.
ImportantSwitching between page experiences discards all unsaved changes. To avoid losing work, save your changes before switching to a different experience.
-
Enter your translation for available fields.
-
Click Publish or Save as Draft.
Publishing your translations applies them to the content page and saves it as a draft.
Also, if a workflow is enabled, publishing translations initiates the review process before they’re applied to the page and saved as a draft.
Alternatively, you can click Save as Draft to apply your translations at a later time.
Exporting and Importing Translations
To export pages for translation or import XLIFF translations, you must have View and Update permissions for the selected page. See Managing Translation Permissions for more information.
With Liferay, you can export content page experiences 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.
Liferay supports both XLIFF 1.2 and 2.0 files. However, it may not support all features and capabilities those formats provide.
Exporting Pages for Translation
-
Open the Site Menu (), expand Site Builder, and go to Pages.
-
Click Actions () for the content page you want to translate and select Export for Translation. This opens a modal window for configuring your export.
-
Select an export format: XLIFF 1.2 or XLIFF 2.0.
-
Select the content page’s original language.
-
Select the languages you want to translate to.
-
Select the experiences you want to translate.
-
Click Export.
Liferay generates a ZIP archive that contains an XLIFF file for each selected experience. You can then use these files with compatible translation software.
Importing Page Translations
-
Open the Site Menu (), expand Site Builder, and go to Pages.
-
Click Actions () for the translated content page and select Import Translation.
-
Select the
.xliff
,.xlf
, and.zip
files you want to import.ImportantWhile Liferay supports importing XLIFF files created using the Export for Translation action, it cannot guarantee the successful import of files generated by other means.
-
Click Publish.
If import is successful, Liferay displays a success message with the imported files. The translations are applied to the content page and the page is saved as a draft. If workflow is enabled, the translations must be approved before they’re applied to the page.
However, if errors occur during import, Liferay notifies you of the failing files and provides a downloadable CSV error report.
Translating Content Pages Using Third Party Services
If you’ve enabled Liferay’s integration with Google Cloud Translation, Amazon Translate, or Microsoft Translator, you can use them to automatically translate Web Content. See Using Third Parties for Translation for more information.