mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-26 21:16:57 +08:00
[desktop] fix bug 65944
This commit is contained in:
@ -68,8 +68,9 @@ if ( window.AscDesktopEditor ) {
|
||||
}
|
||||
|
||||
if ( window.RendererProcessVariable.rtl !== undefined ) {
|
||||
const nativevars = window.RendererProcessVariable;
|
||||
localStorage.setItem("ui-rtl", (nativevars.rtl == 'yes' || nativevars.rtl == 'true') ? 1 : 0);
|
||||
window.native = {
|
||||
rtl: window.RendererProcessVariable.rtl === true || window.RendererProcessVariable.rtl == "yes" || window.RendererProcessVariable.rtl == "true"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,17 @@ if (!window.lang) {
|
||||
window.lang = window.lang ? window.lang[1] : '';
|
||||
}
|
||||
window.lang && (window.lang = window.lang.split(/[\-\_]/)[0].toLowerCase());
|
||||
if ( !isIE && (checkLocalStorage && localStorage.getItem("ui-rtl") === '1' || (!checkLocalStorage || localStorage.getItem("ui-rtl") === null) && window.lang==='ar')) {
|
||||
|
||||
var ui_rtl = false;
|
||||
if ( window.native && window.native.rtl !== undefined ) {
|
||||
ui_rtl = window.native.rtl;
|
||||
} else {
|
||||
if ( checkLocalStorage && localStorage.getItem("ui-rtl") !== null )
|
||||
ui_rtl = localStorage.getItem("ui-rtl") === '1';
|
||||
else ui_rtl = lang === 'ar';
|
||||
}
|
||||
|
||||
if ( ui_rtl && !isIE ) {
|
||||
document.body.setAttribute('dir', 'rtl');
|
||||
document.body.classList.add('rtl');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user