From 414de531ffb6f80ed0be8a94fd844ed51cab67e8 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 ++++++++++-- 2 files changed, 19 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 c681f804a7..60ad6cbbcf 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -142,10 +142,18 @@ sub openpage { $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; } - print < +END - + my $rtl = &Lang::RightToLeft(); + if ($rtl > 0) { + print ""; + } else { + print ""; + } + + print < $title -- 2.39.5