Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

krishc76025392
Level 2
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.

AEM 6.5.0 AEM Translation translations
1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
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
asutosh_jena
Community Advisor
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!

Vijayalakshmi_S
Correct answer by
Community Advisor
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