Expand my Community achievements bar.

SOLVED

How to get current page or current page sub page or all pages contents byte for post to remote server for translate

Avatar

Former Community Member

Now there is a need to get current page or current page sub page or all pages in CQ5, also need 1)to post the page content to remote server for translate; 2) and if necessary to post the page's properties like title and description to remote server for tranlate. As a result, these page file translated will be pulled back to CQ5

And now i found in this forum someone mentioned as below could get:

currentPage - request.getResource().adaptTo(Page.class)

currentNode - request.getResource().adaptTo(Node.class)

 

My question is:  if developer could get the whole page file (XX.html) to post remote server for translate and how to get?  If false, how to deal with that case: get page content that need to translate, then post it to remote server for translate?

 

So anyone could help provide suggestion? Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10
6 Replies

Avatar

Correct answer by
Level 10

Avatar

Former Community Member

Hi sham,

Many thanks for your reply, i think it is helpful to me really. Now i am checking it but a place let me confused that there is no any defined language in the "workflow" tab of the sidekick. Please see the screenshot following: [img]nolanguage.jpg[/img]

Avatar

Level 10

lei brian wrote...

Hi sham,

Many thanks for your reply, i think it is helpful to me really. Now i am checking it but a place let me confused that there is no any defined language in the "workflow" tab of the sidekick. Please see the screenshot following:

 

One of the cause might be you are missing hotfix NPR-3561 http://helpx.adobe.com/experience-manager/kb/cq561-available-hotfixes.html 

Avatar

Former Community Member

Hi sham,

Again, now i need to use Java language to develop the translating logic that copy page or get page information in AEM. But i notice that the CQ provide relevant API, you can see here: http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/api/PageManager.html. So my question is following:

1) How to get the CQ jar to develop?

2) Should i use JCR(JAR) API or CQ(JAR) API to develop? I don't know what the difference between both?

 

Thanks a lot.

Avatar

Level 10

Hi bbboy2014,

The links works for me. If  translating logic witin aem then can use aem api, if external outside aem then use jcr api.

Thanks,
Sham
 Tweet: @adobe_sham