AEM Cloud Connector

AEM Cloud Connector Installation and Configuration

The following article will walk you through the steps to installing and configuring AEM Cloud with Smartling. Before proceeding with AEM Cloud installation, please read the following and linked additional resources.

Background

Adobe separated “code” and “content” for AEM Cloud. The “code” part of the repository is immutable and can only be changed with Pipeline build. The connector package contains both “code” and “content” data, it cannot be installed via CRX DE Package Manager anymore. To install the Smartling AEM Cloud Connector, you need to add a repository where the connector is and should depend on them and embed in the package.

Adobe suggested ISV Partners to submit a connector to the public Maven repository. Therefore, it is recommended to embed the connector as a part of AEM customization project.

Installation (Required)

Steps for embedding connector to a customization project

1. Copy and paste the following to main POM.xml (i.e. the public Maven repository where connector package is resided)

<repository>

    <id>central</id>

    <name>Central Repository</name>

    <url>https://repo.maven.apache.org/maven2</url>

    <layout>default</layout>

    <snapshots>

        <enabled>false</enabled>

    </snapshots>

</repository>

 

2. Check all dependencies. Add the following dependency to the connector package in main POM

<dependency>

       <groupId>com.smartling.aem</groupId>

       <artifactId>com.smartling.aem.connector</artifactId>

       <version>5.3.6</version>

       <type>zip</type>

   </dependency>

3. Add dependency to the connector package in All project’s POM

<dependency>

       <groupId>com.smartling.aem</groupId>

       <artifactId>com.smartling.aem.connector</artifactId>

       <type>zip</type>

   </dependency>

4. The Smartling AEM Cloud should be embedded. Add the connector package as embedded dependency to All package (the following listing is an example)

<plugin>

       <groupId>org.apache.jackrabbit</groupId>

       <artifactId>filevault-package-maven-plugin</artifactId>

       <extensions>true</extensions>

       <configuration>

           <group>com.adobe.aem.guides</group>

           <allowIndexDefinitions>true</allowIndexDefinitions>

           <embeddeds>

               <embedded>

                   <groupId>com.adobe.aem.guides</groupId>

                   <artifactId>aem-guides-wknd.ui.apps</artifactId>

                   <type>zip</type>

                   <target>/apps/wknd-packages/application/install</target>

                      </embedded>

               <embedded>

                   <groupId>com.adobe.aem.guides</groupId>

                   <artifactId>aem-guides-wknd.ui.content</artifactId>

                    <type>zip</type>

                   <target>/apps/wknd-packages/content/install</target>

               </embedded>

                    <embedded>

                       <groupId>com.adobe.aem.guides</groupId>

                       <artifactId>aem-guides-wknd.ui.content.sample</artifactId>

                       <type>zip</type>

                       <target>/apps/wknd-packages/content/install</target>

                      </embedded>

                    <embedded>

                       <groupId>com.smartling.aem</groupId>

                       <artifactId>com.smartling.aem.connector</artifactId>

                       <type>zip</type>

                       <target>/apps/smartling-vendor-packages/application/install</target>

                        </embedded>

                 </embeddeds>

          </configuration>

   </plugin>

5. Add filter for Smartling package

<filter root="/apps/smartling-vendor-packages"/>

 

Ensure that the `allowIndexDefinitions` flag is set to `true` for the configuration.

Maven build will create an “All” package with embedded Smartling Cloud Connector inside. The connector will be installed on AEM Cloud with the next AEM Cloud Pipeline Build.

 

Configuration

Smartling credentials configuration is available in the same way as for Touch Connector.

Cloud Services

Screenshot_2021-02-02_at_14.52.18.png

Smartling Configuration Editor

Screenshot_2021-02-02_at_14.52.12.png

The Web Console is not available for users in AEM Cloud. It means you don’t have a UI in AEM for configuring additional options for the connector.

However, you can apply OSGi configurations with special XML files. It works for both AEM Standalone and AEM Cloud. 

You should create a new AEM locale user for the connector or reuse existing. Content Viewer should have permissions to browse (read) content. These requirements are the same as for Touch Connector. The only difference is deploying configuration to AEM: via UI for Touch Connector, via XML file for Cloud Connector.

How to configure the connector for context

1. Create a new .xml file, for example; 

/apps/<your-app>/config/com.smartling.aem.connector.context.impl.resources.http.HttpResourceLoader.xml

 

2. Add the following file body:

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"

          xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig"

         server.url="your-aem-instance-url"

          user.name="<your-content-viewer-user-name>"

          user.password="<your-content-viewer-user-password>" />

 

The configuration will be deployed on the next Pipeline Build.

After you have completed all steps above, you can check connector installation and initial configuration on Cloud Services page

Screenshot_2021-02-02_at_14.52.03.png

Clicking on `Test Connection` icon should check connectivity to Smartling TMS and retrieving a context. A successful connection message will appear.

Screenshot_2021-02-02_at_14.51.12.png

 

Troubleshooting Configuration

  1. When creating a Smartling configuration, make sure that you set the configuration for the page that is the parent to your sites (original and localized).
  2. Error: "The Translation Provider Doesn't Support Translation for the Selected Language Pair."
    The AEM Cloud Connector is delivered with predefined language mappings between Smartling and AEM language codes. This error means that the AEM site language code does not match a Smartling language code. For example, an AEM site uses the code "fr" for French, but Smartling project uses "fr-FR" for French (France). To correct the problem, update the mapping and restart your job.

AEM site language code:

produits.png

Incorrect mapping:

translation_project_properties.png

Smartling language code:

smartling_language_code.png

Correct mapping:

correct_mapping.png

You can adjust language mappings in /apps/granite/translation/connector/config/smartling/languageMapping. Generally, you should only need to edit this file when you add a new language in AEM.

 



Was this article helpful?