Forums / General / Search all the non translated articles?

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

eZ debug

Timing: Jan 18 2025 19:12:04
Script start
Timing: Jan 18 2025 19:12:04
Module start 'content'
Timing: Jan 18 2025 19:12:05
Module end 'content'
Timing: Jan 18 2025 19:12:05
Script end

Main resources:

Total runtime1.5589 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0124 587.7344180.8359
Module start 'content' 0.01241.5399 768.5703464.8438
Module end 'content' 1.55230.0065 1,233.414142.1016
Script end 1.5588  1,275.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2136140.0002
Check MTime0.00140.0891140.0001
Mysql Total
Database connection0.00450.285610.0045
Mysqli_queries1.509396.8189550.0274
Looping result0.00060.0396530.0000
Template Total1.511296.920.7556
Template load0.00260.169020.0013
Template processing1.508696.772220.7543
Template load and register function0.00020.015610.0002
states
state_id_array0.00160.100110.0016
state_identifier_array0.00390.253320.0020
Override
Cache load0.00200.1296170.0001
Sytem overhead
Fetch class attribute can translate value0.00080.051420.0004
Fetch class attribute name0.00160.099620.0008
XML
Image XML parsing0.00030.022520.0002
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00330.2104120.0003
String conversion0.00000.000430.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs