Import multilanguage content to ez

Author Message

Pierre Tissot

Wednesday 21 November 2007 7:40:14 am

Hello,

I need to import multi language via script to Ez. I can find several extension to import data, but none of them speak about language. Is there any help out there?

On my own i discover, and correct me if I'm wrong that to create an object in a specific language we use:

                 
                    $contentObject =& $class->instantiate( $userID, $sectionID, false, 'fre-FR' );

but once the object is created I want to create in other languages how to proceed? with:


    eZContentObjectTreeNode::subTree( array( 'Language' => 'fre-FR'  )

Can somebody enligth me?

PiR

Laurent BOURREL

Wednesday 21 November 2007 8:27:16 am

Hi Pierre,

The idea is to create another version of your object. Try something like this(draft, not tested) :

$VersionAutre = $contentObject->createNewVersionIn("eng-UK","fre-FR");
$VersionAutre->setAttribute( 'status', EZ_VERSION_STATUS_DRAFT );
$version =& $contentObject->version($VersionAutre);		
$VersionAutre->store();	

Daniel Hoppe

Wednesday 21 November 2007 11:12:31 am

Hi Pierre,

I had the same problem, so I wrote my own extension
(nearly finished, only some trouble with Unicode image names and its not pure OOP).

I will clean the code and publish it if more people are interested in this kind of extension.
If you can not wait please contact my by personal message.

Daniel

Heath

Wednesday 21 November 2007 11:45:59 am

Hello Daniel,

interest +1

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Pierre Tissot

Monday 26 November 2007 1:34:50 am

...Me too +9999 ;-)

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 16:03:52
Script start
Timing: Jan 18 2025 16:03:52
Module start 'layout'
Timing: Jan 18 2025 16:03:52
Module start 'content'
Timing: Jan 18 2025 16:03:53
Module end 'content'
Timing: Jan 18 2025 16:03:53
Script end

Main resources:

Total runtime0.7561 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.9219152.6250
Module start 'layout' 0.00740.0032 740.546939.4609
Module start 'content' 0.01060.7442 780.0078626.7188
Module end 'content' 0.75480.0013 1,406.726612.1563
Script end 0.7561  1,418.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4661160.0002
Check MTime0.00140.1905160.0001
Mysql Total
Database connection0.00090.121610.0009
Mysqli_queries0.694591.8548670.0104
Looping result0.00080.1070650.0000
Template Total0.720595.320.3602
Template load0.00220.293320.0011
Template processing0.718394.993620.3591
Template load and register function0.00040.051410.0004
states
state_id_array0.00120.158310.0012
state_identifier_array0.00110.141420.0005
Override
Cache load0.00190.2521300.0001
Sytem overhead
Fetch class attribute can translate value0.00120.161140.0003
Fetch class attribute name0.00250.330960.0004
XML
Image XML parsing0.00090.113640.0002
class_abstraction
Instantiating content class attribute0.00000.002560.0000
General
dbfile0.00070.0906170.0000
String conversion0.00000.000940.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs