How to create content objects in other than the default language

Author Message

Thomas Negeli

Wednesday 28 April 2010 4:04:36 am

How can I create a content object in other than the default language of the siteaccess?

I use createAndPublishObject from eZContentFunctions to create the objects. This works, but if I want to translate such an object afterwards, how to do this?

I tried createNewVersionIn(...) to do this, but it didn' work.

Is this the right way to translate an object to another than the current language?

Any advice would be cool.

Thanks.

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

Main resources:

Total runtime1.2087 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.1797152.6563
Module start 'layout' 0.00710.0072 740.835939.5078
Module start 'content' 0.01431.1927 780.3438398.7813
Module end 'content' 1.20700.0016 1,179.12508.0938
Script end 1.2086  1,187.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2979160.0002
Check MTime0.00140.1149160.0001
Mysql Total
Database connection0.00140.114310.0014
Mysqli_queries1.162996.2090460.0253
Looping result0.00060.0496440.0000
Template Total1.163996.320.5820
Template load0.00230.192120.0012
Template processing1.161696.104720.5808
Template load and register function0.00050.040210.0005
states
state_id_array0.00100.081510.0010
state_identifier_array0.00140.112620.0007
Override
Cache load0.00180.147690.0002
Sytem overhead
Fetch class attribute can translate value0.00130.103710.0013
Fetch class attribute name0.00100.085610.0010
XML
Image XML parsing0.00020.019410.0002
class_abstraction
Instantiating content class attribute0.00000.000910.0000
General
dbfile0.00250.2074100.0003
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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 4
 Number of unique templates used: 4

Time used to render debug report: 0.0002 secs