Topic on Help talk:CirrusSearch

Translate: how to have suggestions in the current language ?

5
Tuxxic (talkcontribs)

Hi everyone,

I am running a multilingual MediaWiki with MLEB, and wanted to know if there is any means to have the suggestions in the search localised ?

To be complete, my wiki is in French with pages translated in English.

I translate the titles of the pages (by using the namespace "Translations:Pagename/Page display title/en")

I want my users who search for an english term to display first the "Page display title" for their language in the suggestions.

I think it's only a setting to do, but I don't know where to search.

Thanks in advance !

DCausse (WMF) (talkcontribs)

Assuming you don't use the completion suggester you may be able to tune results based on user language by using $wgCirrusSearchLanguageWeight:

$wgCirrusSearchLanguageWeight = [
        'user' => 10.0, // should favor pages in user language
        'wiki' => 1.2, // boost pages in wiki language

];
Tuxxic (talkcontribs)

Hi,

Thanks for answering, don't close too soon please.

I don't think it's what I need. Can you please explain what the setting does ?

Also, I need to have the translated page title in the suggestions.

DCausse (WMF) (talkcontribs)

Sorry, I probably misunderstood your question.

These settings permit to favor pages in some language.

E.g. you have a list of pages:

- Documentation

- Documentation/fr

- Documentation/en

If my user interface is set to french it should help to promote Documentation/fr first when starting to type Docum.

If the title is translated there's currently no way to make it appear in search results. This would require more tight integration between Translate and CirrusSearch, the translated title is not really a title and is not known by CirrusSearch.

You may want to file a feature request in phabricator.

Tuxxic (talkcontribs)

Cool, thanks for understanding better my needs :)

I'll file a feature request in Phabricator, I hoped there was a means to do it flawlessly.

Thanks for your time.

Reply to "Translate: how to have suggestions in the current language ?"