Use the main language if there is no prioritized translation.

Author Message

Hal Gatewood

Thursday 06 January 2011 6:31:12 am

It appears ezfind does not take into account the 'Use the main language if there is no prioritized translation." checkbox. Is this true?

We have three languages eng-CA, fre-CA and eng-US. A translation has been made for the CA languages and the 'use main language' checkbox has been checked for the US. When we search in US nothing shows up. If we create a translation for the US it will start showing up.

Thanks in advance.

Matthieu Sévère

Thursday 06 January 2011 7:36:53 am

Hi,

Normally eZFind follow the fallback defined in SiteLanguageList (I don't know if the checkbox "use main language" as any effect). But this behaviour can be disabled with the SearchMainLanguageOnly in ezfind.ini

Did you enable or disable this setting ?

--
eZ certified developer: http://ez.no/certification/verify/346216

Hal Gatewood

Thursday 06 January 2011 7:53:37 am

SearchMainLanguageOnly=disabled

SiteLanguageList[]
SiteLanguageList[]=eng-US

If I add eng-CA to the SiteLanguageList the search will work, but the checkbox is ignored. So this product will appear on the frontend when the checkbox is unchecked and there is no translation.

Paul Borgermans

Friday 07 January 2011 1:13:26 pm

This is a bug, what should happen is that the indexing process takes this into account and *forces* an indexation of the main language versionin case there is "Use the main language if there is no prioritized translation." active

The downside is somewhat less good relevance in normal searches, but for related languages as your use-case indicates, it should not pose much of a problem

The current behaviour is somewhat intended, simply because the eZ Find backend is by default language sensitive.

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Hal Gatewood

Monday 10 January 2011 1:12:04 pm

Hmmm...

So should I add something like this in the class ezfeZPSolrQueryBuilder and function buildLanguageFilterQuery. I only say this because if I add it to the 'SiteLanguageList' variable it will affect the rest of the site.

if($ini->variable( 'RegionalSettings', 'Locale' ) == "eng-US")
{
$languages[] = "eng-CA";
}

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 02:07:44
Script start
Timing: Jan 18 2025 02:07:44
Module start 'layout'
Timing: Jan 18 2025 02:07:44
Module start 'content'
Timing: Jan 18 2025 02:07:44
Module end 'content'
Timing: Jan 18 2025 02:07:44
Script end

Main resources:

Total runtime0.4782 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.0049 592.0078152.6563
Module start 'layout' 0.00490.0024 744.664139.5000
Module start 'content' 0.00730.4696 784.1641613.6875
Module end 'content' 0.47690.0013 1,397.851616.0859
Script end 0.4782  1,413.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.6210160.0002
Check MTime0.00120.2534160.0001
Mysql Total
Database connection0.00070.140710.0007
Mysqli_queries0.420587.9247670.0063
Looping result0.00070.1360650.0000
Template Total0.447893.620.2239
Template load0.00230.480520.0011
Template processing0.445593.147220.2227
Template load and register function0.00010.021110.0001
states
state_id_array0.00090.195310.0009
state_identifier_array0.00130.269020.0006
Override
Cache load0.00190.4028320.0001
Sytem overhead
Fetch class attribute can translate value0.00050.101830.0002
Fetch class attribute name0.00090.192280.0001
XML
Image XML parsing0.00260.547030.0009
class_abstraction
Instantiating content class attribute0.00000.0038100.0000
General
dbfile0.00210.4489290.0001
String conversion0.00000.002140.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs