common.php:

- store language in session variable
  (BTW: storing it only at login instead of calling check_language() on 
  every page would save some processor cycles ;-)

templates/header.tpl:
- add   class="lang-XY"   (where XY is the language to the body tag.
  This allows language-specific CSS code: .lang-XY table {...}

This commit implements the feature request from J.Kruis (jan-kruis)
https://sourceforge.net/tracker/?func=detail&aid=2903088&group_id=191583&atid=937967



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@872 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 14 years ago
parent 06d65a32b3
commit 98c0252a08

@ -45,7 +45,8 @@ if(isset($CONF['configured'])) {
require_once("$incpath/languages/language.php");
require_once("$incpath/functions.inc.php");
require_once("$incpath/languages/" . check_language () . ".lang");
$_SESSION['lang'] = $language = check_language (); # TODO: storing the language only at login instead of calling check_language() on every page would save some processor cycles ;-)
require_once("$incpath/languages/" . $_SESSION['lang'] . ".lang");
/**
* @param string $class

@ -15,7 +15,7 @@
<link rel="stylesheet" type="text/css" href="{$CONF.theme_css}"/>
<title>Postfix Admin - {$smarty.server.HTTP_HOST}</title>
</head>
<body>
<body class="lang-{$smarty.session.lang}">
<div id="login_header">
<img id="login_header_logo" src="{$CONF.theme_logo}" alt="Logo"/>
{if $CONF.show_header_text==='YES' && $CONF.header_text}

Loading…
Cancel
Save