mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 07:41:23 +08:00
Fix loading not-rtl language
This commit is contained in:
@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user