aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2020-10-28 23:29:55 +0100
committerfilip <filip.komar@gmail.com>2020-10-28 23:29:55 +0100
commit251d5629bc33bf72ce3b53f2abf83cef5e9f6fce (patch)
tree82e39d4fec2f0a0efb3078ab99498f9808a982f8
parent932d7f26f2f0dd101b6d4ec2d80023c61a752aba (diff)
downloadwww-251d5629bc33bf72ce3b53f2abf83cef5e9f6fce.tar
www-251d5629bc33bf72ce3b53f2abf83cef5e9f6fce.tar.gz
www-251d5629bc33bf72ce3b53f2abf83cef5e9f6fce.tar.bz2
www-251d5629bc33bf72ce3b53f2abf83cef5e9f6fce.tar.xz
www-251d5629bc33bf72ce3b53f2abf83cef5e9f6fce.zip
adding RTL support for documentation + archive pages
-rw-r--r--en/doc/archive.php8
-rw-r--r--en/doc/index.php7
2 files changed, 9 insertions, 6 deletions
diff --git a/en/doc/archive.php b/en/doc/archive.php
index c80abf8d1..5b7e11b64 100644
--- a/en/doc/archive.php
+++ b/en/doc/archive.php
@@ -4,9 +4,10 @@ define('ALIGNMENT', 'Center');
require '../../langs.php';
$dictionary = read_translation_file($locale, array('documentation', 'common_footer'));
require 'doc.php';
+$rtl = is_locale_rtl($locale);
?><!DOCTYPE html>
-<html lang="<?php echo $locale; ?>" dir="ltr">
+<html <?php echo $rtl ? 'dir="rtl"' : 'dir="ltr"'?> lang="<?php echo $locale; ?>">
<head>
<meta charset="utf-8">
<title><?php _g('Mageia Documentation\'s Archive')?></title>
@@ -14,8 +15,9 @@ require 'doc.php';
<meta name="keywords" content="<?php _g('doc,documentation,help,guide,installer,installation,mageia,linux')?>">
<?php echo common_header(); ?>
<?php include '../../analytics.php'; ?>
-</head
-<body class="doc">
+ <?php echo $rtl ? '<style> caption { text-align: right; } </style>' : ''?>
+</head>
+<body class="doc" <?php echo $rtl ? 'style="text-align: right;"' : ''?>>
<?php echo $hsnav; ?>
<h1 id="mgnavt"><?php _g('Mageia Documentation\'s Archive')?></h1>
<div id="doc" class="yui-t7" style="margin-bottom: 0px;">
diff --git a/en/doc/index.php b/en/doc/index.php
index 38e381c7d..b15692056 100644
--- a/en/doc/index.php
+++ b/en/doc/index.php
@@ -5,10 +5,10 @@ require '../../langs.php';
$dictionary = read_translation_file($locale, array('documentation', 'common_footer'));
require 'doc.php';
-
+$rtl = is_locale_rtl($locale);
?><!DOCTYPE html>
-<html lang="<?php echo $locale; ?>" dir="ltr">
+<html <?php echo $rtl ? 'dir="rtl"' : 'dir="ltr"'?> lang="<?php echo $locale; ?>">
<head>
<meta charset="utf-8">
<title><?php _g('Mageia Documentation')?></title>
@@ -16,8 +16,9 @@ require 'doc.php';
<meta name="keywords" content="<?php _g('doc,documentation,help,guide,installer,installation,mageia,linux')?>">
<?php echo common_header(); ?>
<?php include '../../analytics.php'; ?>
+ <?php echo $rtl ? '<style> caption { text-align: right; } </style>' : ''?>
</head>
-<body class="doc">
+<body class="doc" <?php echo $rtl ? 'style="text-align: right;"' : ''?>>
<?php echo $hsnav; ?>
<h1 id="mgnavt"><?php _g('Mageia Documentation')?></h1>
<div id="doc" class="yui-t7">