Forums / Developer / Import multilanguage content to ez

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 ;-)

eZ debug

Timing: Jan 31 2025 01:35:11
Script start
Timing: Jan 31 2025 01:35:11
Module start 'content'
Timing: Jan 31 2025 01:35:11
Module end 'content'
Timing: Jan 31 2025 01:35:12
Script end

Main resources:

Total runtime0.2321 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0164 587.9531370.2891
Module start 'content' 0.01640.0134 958.24221,005.6563
Module end 'content' 0.02980.2023 1,963.89843,894.2109
Script end 0.2321  5,858.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00502.1434200.0002
Check MTime0.00150.6436200.0001
Mysql Total
Database connection0.00170.721610.0017
Mysqli_queries0.116850.31201410.0008
Looping result0.00150.66261390.0000
Template Total0.201886.910.2018
Template load0.00090.367010.0009
Template processing0.200986.554510.2009
Override
Cache load0.00060.252910.0006
Sytem overhead
Fetch class attribute can translate value0.00210.900310.0021
XML
Image XML parsing0.00040.168910.0004
General
dbfile0.00351.4930200.0002
String conversion0.00000.003130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs