Page MenuHomePhabricator

getPageLanguage should fallback to content handler language instead of $wgContLang on not supported language codes in database
Closed, ResolvedPublic

Description

Currently getPageLanguage() uses wfGetLangObj() on the database language when a database language exists. wfGetLangObj() returns a Language object when the language code is supported and returns $wgContLang when the language code is not supported.

Expected result: getPageLanguage() should continue with getting the language from the content handler when the language code from the database is not supported.

Other language functions like getPageViewLanguage() should do the same.

Event Timeline

Fomafix renamed this task from getPageLanguage should fallback to content handler language instead of $wgLang on not supported language codes in database to getPageLanguage should fallback to content handler language instead of $wgContLang on not supported language codes in database.Oct 3 2018, 8:08 AM
Fomafix updated the task description. (Show Details)

Change 441529 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] Title: Introduce getDbPageLanguage()

https://gerrit.wikimedia.org/r/441529

Change 441529 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] Title: Introduce getDbPageLanguage()

https://gerrit.wikimedia.org/r/441529

Change 829110 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/core@master] Title::getPageLanguage: Fallback to content handler language

https://gerrit.wikimedia.org/r/829110

Jdlrobson subscribed.

Wondering if language team have any thoughts on this?

Nikerabbit subscribed.

I find the task description insufficient to understand what behavior might be changing and what are the pros and cons of the current vs. proposed behavior.

Anyway, this feels like MediaWiki core thing that has no or limited overlap with the expertise in the Language team. I'll follow this task myself though.

Change 829110 merged by jenkins-bot:

[mediawiki/core@master] Title::getPageLanguage: Fallback to content handler language

https://gerrit.wikimedia.org/r/829110

matmarex assigned this task to Fomafix.
matmarex subscribed.