Wordbee integration

The Wordbee integration for Squiz Matrix makes translating content an efficient and user-friendly process. The translation package lets you push Matrix pages to Wordbee for translation, update the content in Matrix when the translation is completed, integrate with your authoring workflow, and have Squiz Matrix sites updated with multiple languages.

Features

Translation capabilities

The Wordbee integration can translate the content in the following ways:

  • Any page content from the page name, summary, content, and metadata fields (this is customizable).

  • Any source and target language(s) in either direction.

  • Any number of sites within each Matrix instance.

The integration has the following benefits:

  • Requires absolutely no manual export or import of translation files. All jobs are completed using web services.

  • Automatically tracks which source content has been newly added or changed.

  • Automatically tracks which translated content was edited in Matrix and may need final approval by the translation provider.

  • Isolates the HTML markup to protect against unintentional tampering.

  • Connects to your preferred translation service providers, in-house team, or TMS.

  • Automatically insert completed translations back into the right places.

Translation review and editing

The Wordbee integration allows you to perform the following tasks:

  • Preview and approve translations before publishing updated content.

  • Edit translations directly in Squiz Matrix, with the ability to send those edits to your translation team for linguistic approval.

Translation cost optimization (Wordbee)

The Wordbee translation service offers the following features:

  • Automatically identifies if a sentence or paragraph has been translated in the past. The system automatically reuses past translations and does not send previously translated content to your translation team.

  • Automatically identifies repeating sentences and paragraphs from the new translation requests and sends these only once for translation. This may lead to an overall translation volume reduction of 20% or more. Your translation provider receives unique content only (option).

  • Allows existing translations to be aligned and submitted to your translation team for approval, adding that content to your translation memories.

Compatibility

Below are some Wordbee and Matrix compatibility considerations:

  • Works with Squiz Matrix versions 6.x and higher.

  • Automatically creates the target content pages. Locations can be customized per language.

  • Supports adjustable translatable fields using Matrix metadata schema.

  • Does not interfere with existing Matrix workflows.

Implementation

The Connect Wordbee recipe (integration flows package) enables you to quickly set up the translation workflow in Wordbee with your Matrix editorial team. The recipe adds the automated integration jobs to manage translations and content creation between Wordbee and Squiz Matrix.

The Wordbee Connector included in the Connect recipes talks to the Flex API using the HTTP protocol. The connector provides actions to retrieve the token, push, poll, and pull requests. It can also be used to build your customized translation workflow integrated with Wordbee.

Prerequisites

This initial installation and configuration process consists of two parts: one conducted in Wordbee and the other in Matrix.

Wordbee custom fields

The following custom fields are available for the integration:

Web url

A web URL assigned by Matrix of the page or content

Matrix page id

The asset ID of the standard page; this field is used to identify the key of the segment in Wordbee

Matrix component id

The asset ID of the content component of a standard page; this field is used to identify the key of the segment in Wordbee

Custom fields

An example of the flex file in which the customer fields are presented:

"key": "2767",
"texts": {
    "zh": {
        "v": "<p>3rd content container with html block</p>",
        'cfs": [
        "t": "Matrix id",
        "id": 2,
        "y": "1004"
        },
        {
        "t": "Web url",
        "id": 3,
        "v": "https://dx-develop.dev.matrix.squiz.cloud/3400/wb-translation-folder/page-html-zh"
        },
        {
        "t": "Matrix page id",
        "id": 4,
        "y": "1004"
        },
        {
        "t": "Matrix content id",
        "id": 5,
        "y": "1011"
        }
    }

Matrix metadata schemas

A metadata set needs to be applied to the source and target pages. The same metadata schema needs to be applied at the source and target components level of the standard page.

The source pages should apply the Translation source page schema, while the target pages should apply the Translation target page schema.

Recipe 1: Send Matrix content to Wordbee

Create translated versions of your Matrix site using this recipe.

Flow: Create target language placeholder pages from the source in Matrix

The integration listens to the Matrix trigger when a source page is published and marked for translation. The flow retrieves the source page content and then creates the targeted language page(s) in Matrix with updated links between the source and the target.

The recipe follows a metadata schema that covers metadata values required to support the translation workflows.

Below is a sample metadata schema for the English source page:

Sample metadata schema

Here is a sample metadata schema for a target page where the source asset is an English page (asset id #1930):

Sample metadata target

Below is a screenshot from Matrix which indicates where the metadata schema should be applied.

Sample metadata target

1 Source page schema.

2 Source page schema.

3 Source page schema.

4 Source page schema.

5 Target page schema.

6 Target page schema.

7 Target page schema.

8 Target page schema.

Flow: Push multi-language content to Wordbee

The flow receives an updated Matrix page, then formats the content and sends it to Wordbee. It takes both source and target pages and processes them one by one (partial update).

A standard page in Matrix has attributes such as the name short name at the asset page level. The name and short_name are used as the segment’s key in the Flex file.

The content of the Matrix page is at the Component Content level, so the Component Content asset id of the source page is used as the key for the segment in the Flex file.

Below is a screenshot from Matrix; the content component key is identified using the source component content asset id.

Content component key

1 Matrix ID and Matrix page ID.

2 Matrix content ID (source segment key).

3 Matrix ID and Matrix page ID.

4 Matrix content ID.

Recipe 2: Pull Wordbee translated content into Matrix

Retrieve the translated content from Wordbee and create or update multi-language sites in Matrix.

Flow: Wordbee - Scheduled polling for Wordbee document status

The scheduled flow periodically checks on all Wordbee documents configured within your account. The check pulls content status from Wordbee and triggers a callback request to another flow (Flow: Wordbee - Callback from the status update) on Connect for the workflow.

Here is an example of the configuration with two Wordbee project documents loaded by the flow:

{
    "DID": [
        {
            "ID": "8923"
        },
        {
            "ID": "8926"
        }
    ],
    "CALLBACKURL": "https://in.connect.squiz.cloud/hook/<REDACTED>",
    "dtchange": {
        "hours": 2
    }
}

Flow: Wordbee - Callback from the status update

The flow takes the callback request from Wordbee. If the response contains a filetoken of a completed job from Wordbee, the filetoken is extracted and sent to the following Flow: Wordbee - Update translated content in Matrix.

Flow: Wordbee - Update translated content in Matrix

The flow takes the file token from the previous Flow: Wordbee - Callback from the status update, retrieves the translated file content, processes the content, and updates them in Matrix.

{
    "result": {
        "matrix asset id": "1004" "
        "matrix_type": "component",
        "content": {
        "html": "<p>第二个板块: &nbsp; &nbsp;放一些html的内容, 就可以了!:)</p>"
        },
        "content_key": "2765",
        "lanugage": "zh",
        "matrix_content_id": "1009"
    }
}

Limitations

  • Translation-related metadata can not be set to default because the default value of a metadata field does not pass in the Matrix Asset Management API call.

  • When applying metadata schema to the standard page assets, the metadata schema does not cascade down to the component level. This means the metadata schema has to be applied manually when a standard page of the source page is created in Matrix.