Expand my Community achievements bar.

Meta Translation Functions Not Active For Custom Translator Connector

Avatar

Level 1
 I created a custom translator connector based off of the base AEM translator connector project found here: 

The translation service is successfully registered and created, the "translateArray" function is called when the job is run, and the content is translated correctly. However, no other methods in my translation service are called except for "isDirectionSupported".  I've gone through the flow several times, with both the default project and the project with my updates, and neither shows any logs from any other function in this class.  I am currently trying to integrate our translation memory, but noticed that nothing else outside of this scope is working.

The question is, is there a special configuration that needs to be applied to activate different parts of the custom translation service connector? 

The factory that creates the service class implements TranslationServiceFactory.
public class BootstrapTranslationServiceFactoryImpl implements TranslationServiceFactory{

The actual service class extends "AbstractTranslationService" and implements "TranslationService"
public class BootstrapTranslationServiceImpl extends AbstractTranslationService implements TranslationService{

The AbstractTranslationService Class:
 
The TranslationService Interface:
 
2 Replies

Avatar

Level 4

Hi @AlexFe3 ,

 

If only translateArray() is being called in your custom AEM translation connector, it means AEM thinks your connector only supports basic machine translation. That’s why none of the extra methods like createJob(), updateJob(), or translation memory functions are triggered.

Fix
You must tell AEM that your connector supports more features. In your service class (BootstrapTranslationServiceImpl), enable them like this:

@Override
public boolean supportsTranslationJobControl() {
    return true;
}

@Override
public boolean supportsTranslationMemory() {
    return true;
}

@Override
public TranslationMethod getTranslationMethod() {
    return TranslationMethod.HUMAN; // or CUSTOM
}

 

Then in AEM:

Go to Tools → Cloud Services → Translation Cloud Services

Edit your connector config

Set Translation Method = Human Translation

Enable Translation Memory if needed

After this, AEM will start calling other meta functions automatically.

 

Thanks & regards,

Vishal

Avatar

Level 1

Hello and thanks for the reply.

 

None of these methods are available in either the abstract class nor the interface. Is there another class/interface I need to implement to get access to these methods?

Also, perhaps I am misunderstanding how the translation memory features are supposed to work.  My general goal is to be able to do machine translation via the connector, and then, if needed, have a human go in and edit any incorrect values. I was expecting to be able to query our DB from the connector methods and return all of the translation memory values, such that a user on the UI could then edit them if needed.  I do not understand how or why "human" translation would affect this.