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.