From: Michael Tremer Date: Tue, 11 Dec 2012 17:21:33 +0000 (+0100) Subject: Add support for languages that read from right to left. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Flanguage-rtl;p=people%2Fms%2Fipfire-2.x.git Add support for languages that read from right to left. --- 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