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.

eZ debug

Timing: Jan 18 2025 22:29:17
Script start
Timing: Jan 18 2025 22:29:17
Module start 'layout'
Timing: Jan 18 2025 22:29:17
Module start 'content'
Timing: Jan 18 2025 22:29:18
Module end 'content'
Timing: Jan 18 2025 22:29:18
Script end

Main resources:

Total runtime0.8928 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.0625152.6250
Module start 'layout' 0.00460.0025 741.687539.4453
Module start 'content' 0.00710.8841 781.1328459.7656
Module end 'content' 0.89110.0016 1,240.89848.1563
Script end 0.8927  1,249.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3398160.0002
Check MTime0.00130.1499160.0001
Mysql Total
Database connection0.00060.063510.0006
Mysqli_queries0.850795.2867540.0158
Looping result0.00110.1243520.0000
Template Total0.867197.120.4335
Template load0.00180.205720.0009
Template processing0.865296.916520.4326
Template load and register function0.00020.023410.0002
states
state_id_array0.00090.104710.0009
state_identifier_array0.00120.138320.0006
Override
Cache load0.00150.1662170.0001
Sytem overhead
Fetch class attribute can translate value0.00130.142220.0006
Fetch class attribute name0.00150.170320.0008
XML
Image XML parsing0.00050.051920.0002
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00060.0665100.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs