How to automate content translation for CSV import

Author Message

viraj hoober

Moderated by: Nicolas Pastorino

Tuesday 24 August 2010 3:01:30 am

Hi i am using the data_import extension to import CSV files which contains user details. The import operation works fine. Problem comes when searching a user using ezfind. Although the user is present, you don't get the result.

After much search i got a solution but it is not appropriate for me ( http://share.ez.no/articles/ez-publish/translating-content-in-ez-publish ). When performing a content translation, i get the result when searching the user.

This solution is not appropriate as i have over 200 users. Is it possible to automate the translation when doing the CSV import? Some help would be greatly appreciated.

Philippe VINCENT-ROYOL

Tuesday 24 August 2010 5:31:41 am

Hi viraj,

Create your own ImportOperator.php. On line 48, you create the object with language you use on your siteaccess ( see getTargetLanguage() function ).

Just add some line to import via different languages :)

Cheers

Philippe

Certified Developer (4.1): http://auth.ez.no/certification/verify/272607
Certified Developer (4.4): http://auth.ez.no/certification/verify/377321

G+ : http://plus.tl/dspe
Twitter : http://twitter.com/dspe

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 05:13:28
Script start
Timing: Jan 18 2025 05:13:28
Module start 'layout'
Timing: Jan 18 2025 05:13:28
Module start 'content'
Timing: Jan 18 2025 05:13:28
Module end 'content'
Timing: Jan 18 2025 05:13:28
Script end

Main resources:

Total runtime0.6938 sec
Peak memory usage4,096.0000 KB
Database Queries56

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.1797152.6406
Module start 'layout' 0.00540.0022 741.820339.4922
Module start 'content' 0.00770.6846 781.3125524.9297
Module end 'content' 0.69230.0015 1,306.24228.1250
Script end 0.6937  1,314.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4528160.0002
Check MTime0.00130.1937160.0001
Mysql Total
Database connection0.00090.126010.0009
Mysqli_queries0.649493.6039560.0116
Looping result0.00080.1177540.0000
Template Total0.663495.620.3317
Template load0.00210.303720.0011
Template processing0.661395.315320.3306
Template load and register function0.00030.037610.0003
states
state_id_array0.00070.102810.0007
state_identifier_array0.00190.280920.0010
Override
Cache load0.00170.2413130.0001
Sytem overhead
Fetch class attribute can translate value0.00090.128720.0004
Fetch class attribute name0.00120.173530.0004
XML
Image XML parsing0.00080.115520.0004
class_abstraction
Instantiating content class attribute0.00000.001430.0000
General
dbfile0.00090.1276170.0001
String conversion0.00000.003640.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
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs