Skip to content

Commit

Permalink
Merge pull request 'fix/ve-rtl' (#144) from fix/ve-rtl into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia Radzhabova committed Nov 26, 2024
2 parents 350eba8 + c27a10b commit 92b08c3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/common/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Common.Locale = new(function() {
_4letterLangs = ['pt-pt', 'zh-tw', 'sr-cyrl'];

var _applyLocalization = function(callback) {
_clearRtl();
try {
callback && (loadcallback = callback);
if (l10n) {
Expand Down Expand Up @@ -160,6 +161,15 @@ Common.Locale = new(function() {
});
};

var _clearRtl = function() {
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'];
Expand Down

0 comments on commit 92b08c3

Please sign in to comment.