LanguageFallbackChainFactory currently contains a lot of methods with an unclear purpose. It should be overhauled to cover the following use cases:
- getFallbackChainForSiteContent() // based on site content language, and an optionally extra fallbacks from site config. Ok for cached content.
- getFallbackChainForLanguage( $language ) // based on the given language only; can be used for cached content, if the cache is split by the given language.
- getFallbackChainForUser( $user ) // based on user language and optionally additional user settings (like babel boxes). For non-cacheable output (skin).
On the repo, we can use getFallbackChainForLanguage( $userLanguage ) when generating cacheable page content. For anon users, $userLanguage must be the site language, since the web cache isn't split by language.
On the client, we should use getFallbackChainForSiteContent() when generating output from parser functions or Lua.