Page MenuHomePhabricator

Display translated page title in search results
Open, MediumPublic



We discussed with one user on this topic :, and we couldn't find how to do this :

When using Translate extension, we have the possibility to translate page title. But when you try to search for this title, you only have "Nom page/en" for instance for a page translated in English, instead of the page name.

Is it possible to have an option to display translated title in the search results ?

Event Timeline

Tuxxic created this task.Aug 19 2016, 9:01 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2016, 9:01 AM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptAug 19 2016, 10:49 AM
debt triaged this task as Medium priority.Sep 1 2016, 10:21 PM
debt moved this task from needs triage to This Quarter on the Discovery-Search board.

I saw something interesting in this post, for whoever might be interested in implementing this:

You can use the

{{Translations:Page name/Page display title{{#translation:}}}}

model, to get the translated page title if it exists.

While mostly a hack, the most direct method to deal with this would be some integration to make redirects from the translated name to the actual page.

Nikerabbit added a subscriber: Nikerabbit.EditedSep 14 2018, 3:43 PM

The display title is also available in the database in page props. Doing redirects has the usual issue of name conflicts between languages and possible "violations" of doing cross namespace redirects if the namespaces names are also translated.

Change 460958 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] [WIP] Include display title in search results

Change 460959 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Add display_title to mappings and start indexing it

Change 460960 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] [WIP] Search against the display_title property

Change 460991 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Add display_title to mappings

This is now blocked until roughly december waiting for data to populate the indices before it can be used

This should be about ready to be unblocked (timeline is right, we can't actually check how many pages have display_title currently, since it's not in the mappings). Deploying this requires an in-place reindex across all wikis which can take a week to run. For this reason we should try and coordinate this with any other mapping changes that need to go out.

Last step before deploy:


Is there any progress on searching and displaying the displaytitle in Cirrus? Over here, we're dealing with page titles that cannot be represented in a regular wiki page title, like Gl=v, 1+1+1+1+1+1+1+1+1+1+1+1, about: Saint Luke Drawing the Virgin, or ]...[world]...[ — just your regular titles for digital artworks. 😉 If users cannot search for those, or on the search results page the titles are different, much confusion can be expected.

Aklapper removed EBernhardson as the assignee of this task.Dec 19 2020, 11:34 AM

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See for tips how to best manage your individual work in Phabricator.)