diff --git a/VisualEditor.php b/VisualEditor.php index f15c32c224..182a6171db 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -280,8 +280,8 @@ $wgResourceModules += array( 'jquery.visibleText', 'jquery.byteLength', 'jquery.client', - 'mediawiki.Uri', 'mediawiki.api', + 'mediawiki.language', 'mediawiki.Title', 'mediawiki.Uri', 'mediawiki.user', diff --git a/modules/ve-mw/init/ve.init.mw.Platform.js b/modules/ve-mw/init/ve.init.mw.Platform.js index f5cdfb0ea4..0f5be8f060 100644 --- a/modules/ve-mw/init/ve.init.mw.Platform.js +++ b/modules/ve-mw/init/ve.init.mw.Platform.js @@ -105,15 +105,7 @@ ve.init.mw.Platform.prototype.getLanguageDirection = $.uls.data.getDir; /** @inheritdoc */ ve.init.mw.Platform.prototype.getUserLanguages = function () { - var lang = mw.config.get( 'wgUserLanguage' ), - langParts = lang.split( '-' ), - langs = [ lang ]; - - if ( langParts.length > 1 ) { - langs.push( langParts[0] ); - } - - return langs; + return mw.language.getFallbackLanguageChain(); }; /* Initialization */