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=1d77e6a0d6c660d29cfba675ef12ab05c46c12c9;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 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