Page MenuHomePhabricator

getPageLanguage should fallback to content handler language instead of $wgContLang on not supported language codes in database
Open, Needs TriagePublic

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 created this task.Apr 14 2016, 4:47 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 14 2016, 4:47 AM
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