Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When the application is installed a new button "Automatic Translation" will appear next to Liferay's "Add Translation"

Image RemovedImage Added

When you click on the button "Automatic Translation" a new dialog will be displayed where you can select one or more languages. This dialog will show only the languages that are supported by both the Yandex.Translate API and the current Liferay configuration.

Image RemovedImage Added

After selecting the desired languages and click on the "Continue" button, the new translation(s) should be listed as regular Liferay's translations:

Image RemovedImage Added

This feature will work exactly the same in complex Web Content that uses Liferay's structures and templates, in this case only the fields with text content will be translated.

Image RemovedImage Added

Image RemovedImage Added

After adding a translation, a new version will be created and the Web Content will be marked as a Draft.

Image RemovedImage RemovedImage RemovedImage AddedImage AddedImage Added

Installation

The installation steps are as follows:

...

StepsImages

Click "API key"

Image RemovedImage Added

Log in or register on Yandex

Accept the user agreement to generate an API key.

To recover a key, you can click on "My Keys".

Copy the generated API key

Image RemovedImage Added

Image RemovedImage Added


StepsImages

After obtaining the credentials configure them in the Control Panel:

Under Control Panel, under Configuration, select "System Settings"

Image RemovedImage Added

Search for "Automatic Translator Configuration" and select it.

Image RemovedImage Added

Provide the API key, and then click Save

Image RemovedImage Added


Additional Considerations

There are some languages that may generate characters not supported by some databases using certain configuration, for example the default configuration that Liferay uses to connect to MySQL forces UTF-8 encoding that may lead to Exceptions when trying to add a translation in languages such as Japanese, in the case of MySQL this can be solved changing the connection string in the file portal-ext.properties like this:

 

Locate the JDBC connection string:

...