Page MenuHomePhabricator

"inlanguage" search parameter not working as expected on (due to wrong page content language set for lots of pages)
Closed, InvalidPublic


  1. Go to
  2. Enter "en ligne" -hastemplate:historical -hastemplate:tnt|historical -inlanguage:fr
  3. Click "Search"
  4. See pages in French though I explicitly set -inlanguage:fr per (Translate extension is installed according to )

Event Timeline

@Amire80, this issue with not returning expected results for "inlanguage" seems to be an issue with how pages are being labeled with languages rather than cirrussearch incorrectly. Is something your team can look into or pass onto the appropriate person?

dcausse subscribed.

The language does not seem correct according to pageinfo, e.g. reports en for Page content language.

Nikerabbit subscribed.

The page language is wrong indeed.

Translate extension manages this value automatically for translatable pages. However the MediaWiki main page is not a translatable page using Translate, rather it is a special case done by hand, so it follows that the page language must be managed by hand too. Closing as invalid as this is the expected behavior.

To elaborate a bit further: Main_page includes Template:Main_page, and the latter is a translatable page. Someone has then created Main_page/fr (and other language versions) that include Template:Main_page/fr (or other language respectively). It is not clear to me why it is done this way, but it looks like the template indirection is (no longer?) necessary. I am curious to know if there is still some reason that prevents doing that, and if I can help with that in Translate somehow.

My initial comment is not about the main page. I get results such as Sites using MediaWiki/fr or Manual:Running MediaWiki on GNU/Linux/fr and I don't expect these results as I queried for -inlanguage:fr.

CirrusSearch returns these because MediaWiki says they are english documents. Once MediaWiki can be convinced they are actually french search will filter them.

Ah, thanks for the clarification. I guess that means I should change the content language of quite a few pages...

Aklapper renamed this task from "inlanguage" search parameter ignored/not functional on to "inlanguage" search parameter not working as expected on (due to wrong page content language set for lots of pages).Jun 9 2021, 6:14 AM