Forums / Extensions / eZ Find / Use the main language if there is no prioritized translation.

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";
}

eZ debug

Timing: Jan 29 2025 13:34:16
Script start
Timing: Jan 29 2025 13:34:16
Module start 'content'
Timing: Jan 29 2025 13:34:16
Module end 'content'
Timing: Jan 29 2025 13:34:16
Script end

Main resources:

Total runtime0.1383 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 588.2344180.7500
Module start 'content' 0.00440.0038 768.984499.0703
Module end 'content' 0.00820.1300 868.0547527.9844
Script end 0.1382  1,396.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00302.1964200.0002
Check MTime0.00120.8663200.0001
Mysql Total
Database connection0.00060.445510.0006
Mysqli_queries0.098671.31521410.0007
Looping result0.00110.79121390.0000
Template Total0.129593.710.1295
Template load0.00070.541510.0007
Template processing0.128893.124810.1288
Override
Cache load0.00050.362410.0005
Sytem overhead
Fetch class attribute can translate value0.00090.667410.0009
XML
Image XML parsing0.00030.185210.0003
General
dbfile0.00402.8955200.0002
String conversion0.00000.002830.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