Only show translated content on Multilingual site

Author Message

André R.

Wednesday 22 March 2006 2:16:04 am

Trying out the Multilingual cabilities of ez I dicovered that the english site(eng-GB) also displayes content that is only in the default language.
Content that are not yet translated to english..

I followed this guide:
http://ez.no/products/ez_publish/documentation/configuration/configuration/language_and_charset/how_to_setup_a_multilingual_site

TextTranslation is set to disabled on my site because of some other issues.

[RegionalSettings]
Locale=eng-GB
HTTPLocale=en
ContentObjectLocale=eng-GB
TextTranslation=disabled

[ContentSettings]
TranslationList=eng-GB;nor-NO

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

André R.

Friday 24 March 2006 10:28:11 am

Is there a way to make ez stop showing content in the default language if no translations are done ??

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

J-A Eberhard

Friday 24 March 2006 11:51:41 am

Yes,
You have to use the only_translated parameter in the fetch

{fetch( 'content', 'list',
        hash( 'parent_node_id',  2,
              'only_translated', true() ) )}

Fetch only nodes that reference objects that have been translated into the current language (the language that the siteaccess is using).

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Martin Sanders

Friday 28 April 2006 9:26:43 am

Hi J-A Eberhard,

Were do I stick your {fetch code, which file ? Sorry if I'm missing something.

Many thanks,

André R.

Friday 28 April 2006 12:06:27 pm

I knew about how to do this when you fetch, but I was talking about all content on a specific siteaccess.

like on siteaccess 'ensite', only displaying english content.
But I have been trying out some of the new features in 3.8, and it's a breeze.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 31 2025 06:22:24
Script start
Timing: Jan 31 2025 06:22:24
Module start 'layout'
Timing: Jan 31 2025 06:22:24
Module start 'content'
Timing: Jan 31 2025 06:22:24
Module end 'content'
Timing: Jan 31 2025 06:22:24
Script end

Main resources:

Total runtime0.0167 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.3828151.2422
Module start 'layout' 0.00470.0026 739.625036.7109
Module start 'content' 0.00740.0076 776.335994.3438
Module end 'content' 0.01490.0017 870.679737.9922
Script end 0.0166  908.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.4760140.0002
Check MTime0.00116.3291140.0001
Mysql Total
Database connection0.00063.854110.0006
Mysqli_queries0.002213.391430.0007
Looping result0.00000.078610.0000
Template Total0.00137.610.0013
Template load0.00105.796110.0010
Template processing0.00031.720510.0003
Override
Cache load0.00074.068410.0007
General
dbfile0.003018.227280.0004
String conversion0.00000.035740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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