2 * Language-fallback-chain-related utilities for mediawiki.language.
9 $.extend( mw.language, {
12 * Get the language fallback chain for current UI language (not including the language itself).
14 * @return {string[]} List of language keys, e.g. `['de', 'en']`
16 getFallbackLanguages: function () {
17 return mw.language.getData(
18 mw.config.get( 'wgUserLanguage' ),
24 * Get the language fallback chain for current UI language, including the language itself.
26 * @return {string[]} List of language keys, e.g. `['pfl', de', 'en']`
28 getFallbackLanguageChain: function () {
29 return [ mw.config.get( 'wgUserLanguage' ) ]
30 .concat( mw.language.getFallbackLanguages() );
35 }( mediaWiki, jQuery ) );