You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
add: experiment RTL layout feature
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html id="main_html" lang="en" dir="none">
|
||||
<head>
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
||||
<meta name="viewport" content="viewport-fit=cover" />
|
||||
|
||||
@@ -7,9 +7,13 @@ import { translateModulesPage } from './translate/modules.js'
|
||||
import { translateSettingsPage } from './translate/settings.js'
|
||||
|
||||
export async function setNewLanguage(locate, initialize) {
|
||||
const main_html = document.getElementById('main_html')
|
||||
const old_translations = await getTranslations(initialize ? 'en_US' : localStorage.getItem('/system/language'))
|
||||
const new_translations = await getTranslations(locate)
|
||||
|
||||
if (locate.includes('ar_')) main_html.setAttribute("dir", "rtl");
|
||||
else main_html.setAttribute("dir", "none");
|
||||
|
||||
translateHomePage(old_translations, new_translations)
|
||||
translateModulesPage(new_translations)
|
||||
translateActionsPage(old_translations, new_translations)
|
||||
|
||||
Reference in New Issue
Block a user