diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js index 7a21e51f37..8fe9e03d87 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js @@ -142,10 +142,20 @@ ve.ui.MWMetaDialog.prototype.initialize = function () { ); for ( i = 0; i < languageslength; i++ ) { + languages[i].safelang = languages[i].lang; + languages[i].dir = 'auto'; + if ( $.uls ) { + // site codes don't always represent official language codes + // using real language code instead of a dummy ('redirect' in ULS' terminology) + languages[i].safelang = $.uls.data.isRedirect( languages[i].lang ) || languages[i].lang; + languages[i].dir = $.uls.data.getDir( languages[i].safelang ); + } $languagesTable .append( this.frame.$$( '