From 1d77e6a0d6c660d29cfba675ef12ab05c46c12c9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 11 Dec 2012 18:21:33 +0100 Subject: [PATCH] Add support for languages that read from right to left. --- config/cfgroot/lang.pl | 9 +++++++++ html/html/themes/ipfire/include/functions.pl | 12 +++++++++++- html/html/themes/maniac/include/functions.pl | 12 +++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/config/cfgroot/lang.pl b/config/cfgroot/lang.pl index 707b28d11e..7dbc4ec6c4 100644 --- a/config/cfgroot/lang.pl +++ b/config/cfgroot/lang.pl @@ -157,4 +157,13 @@ sub BuildCacheLang { &General::log ("WARNING: cannot build cachelang file for [$missed].") if ($error); return $error; } + +sub RightToLeft() { + if ($language eq "fa") { + return 1; + } + + return 0; +} + 1; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 2707593dbc..e6af7f650a 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -145,7 +145,17 @@ sub openpage { print < - +END +; + +my $rtl = &Lang::RightToLeft(); +if ($rtl > 0) { + print ""; +} else { + print ""; +} + +print < $title $extrahead diff --git a/html/html/themes/maniac/include/functions.pl b/html/html/themes/maniac/include/functions.pl index 0bb1d6e70d..414d7dce58 100644 --- a/html/html/themes/maniac/include/functions.pl +++ b/html/html/themes/maniac/include/functions.pl @@ -145,7 +145,17 @@ sub openpage { print < - +END +; + +my $rtl = &Lang::RightToLeft(); +if ($rtl > 0) { + print ""; +} else { + print ""; +} + +print < $title $extrahead -- 2.39.5