Search all the non translated articles?

Author Message

thomas BAILLEUL

Tuesday 14 November 2006 9:44:50 am

Hi,

, I built a knowledge base and I would like to know how to search for all the Articles non english translated?
For instance doing a advanced search for an article no yet translated? I don't find a datatype with the status of the article?
I would be really greatful ! Could u help me witha code if u have ever done this developpement.
Thanks

Thomas

Claudia Kosny

Tuesday 14 November 2006 2:06:11 pm

Hi Thomas

I don't know a fast way to do this but if you don't need the data very often you could:
- fetch all content objects and then fetch the available_languages attribute of each object to see what translations exist and filter all that are not translated or
- fetch all nodes, no matter whether translated or not, and then fetch all nodes that are translated into whatever language you want to check. Check the documentation of the content tree fetch function, if necessary. Then make an array_diff on the result to get all nodes that are not in the result of the second fetch.

If you need that information very often it might be worth it to track what the tree fetch function is actually doing when you fetch only_translated nodes. Maybe you can write your own extension which does the same but with a negated only_translated condition.

Good luck

Claudia

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.