diff --git a/apps/common/locale.js b/apps/common/locale.js index f8d01da102..01ffd7d39f 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -43,6 +43,7 @@ Common.Locale = new(function() { _4letterLangs = ['pt-pt', 'zh-tw', 'sr-cyrl']; var _applyLocalization = function(callback) { + _fixRtl(); try { callback && (loadcallback = callback); if (l10n) { @@ -160,6 +161,15 @@ Common.Locale = new(function() { }); }; + var _fixRtl = function(prop, scope) { + if (!_isCurrentRtl() && document.body.classList.contains('rtl')) { + document.body.removeAttribute('dir'); + document.body.classList.remove('rtl'); + document.body.classList.remove('rtl-font'); + document.body.setAttribute('applang', currentLang); + } + }; + if ( !window.fetch ) { /* use fetch polifill if native method isn't supported */ var polyfills = ['../vendor/fetch/fetch.umd'];