Expand my Community achievements bar.

SOLVED

Adding similar type components in a page for translations in AEM 65

Avatar

Level 2

Hi,

In AEM 6.5, I have a scenario where two components of same resource type is being used on a single page with different content, which needs to be sent for translation using connector. And only one among two is being sent.

 

I tried by implementing filter include node pattern in "translation_rules.xml" but couldn't succeed.

 

For example

i have 

/content/test/en-us/play/center/jcr:content/mainpar/tagscomponent

/content/test/en-us/play/center/jcr:content/mainpar/tagscomponent_1642350872

and rule i have is 

 

<node path="/content/test">

<node resourceType="portal/components/tags/TagsComponent">
<property inherit="true" name="richText" translate="true" updateDestinationLanguage="false"/>
</node>

<filter>
<node pathContains="tagscomponent_(*)" translate="true">

</node>
</filter>

</node>

 

Is there any other way to achieve this or i have wrong filter implemented.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6.5
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @krishc76025392,

Following the similar structure as OOTB(/libs/settings/translation/rules/translation_rules.xml), it is suffice to add the <property...> alone within the <node> entry with desired /content path.  

With respect to the content path, text/content authored via tagscomponent/any component for that matter is available as a property with respective name. Hence defining like below will help unless we have any further rule which explicitly says "translate -> false" 

Example :

<node path="/content">
<property name="richText" />
</node>

 

View solution in original post

2 Replies

Avatar

Community Advisor

I believe resourceType only should be able to take care of it as the use of multiple component will be with same resource.

https://helpx.adobe.com/in/experience-manager/6-3/sites/administering/using/tc-rules.html#:~:text=Ru....

 

<node path="/content/geometrixx-outdoors">
<node resourceType ="foundation/components/image">
<property name="alternateText"/>
<property name="jcr:title" />
</node>
<node resourceType ="geometrixx-outdoors/components/title">
<property name="richText"/>
</node>
</node>

 

Thanks!

Avatar

Correct answer by
Community Advisor

Hi @krishc76025392,

Following the similar structure as OOTB(/libs/settings/translation/rules/translation_rules.xml), it is suffice to add the <property...> alone within the <node> entry with desired /content path.  

With respect to the content path, text/content authored via tagscomponent/any component for that matter is available as a property with respective name. Hence defining like below will help unless we have any further rule which explicitly says "translate -> false" 

Example :

<node path="/content">
<property name="richText" />
</node>