HomePhabricator

Use Language object for hook PageContentLanguage

Description

Use Language object for hook PageContentLanguage

In core the parameter &$pageLang contains a Language object and a string
is converted back to a Language object.

This change avoids additional checks in wfGetLangObj by directly
returning a Language object.

getEffectiveLanguage returns already a Language object. Update
documentation and add type hints.

Change-Id: I0271c9efb7d31308b5c551e5b818af8ebdef1235