source: trunk/expressoMail1_2/inc/load_lang.php @ 1037

Revision 1037, 1.0 KB checked in by amuller, 15 years ago (diff)

Ticket #559 - Correção de problema, usando caminho relativo

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2if(!isset($GLOBALS['phpgw_info'])){
3        $GLOBALS['phpgw_info']['flags'] = array(
4                'currentapp' => 'expressoMail1_2',
5                'nonavbar'   => true,
6                'noheader'   => true
7        );
8        require_once '../header.inc.php';
9}
10// Load the lang of the module.
11        if(!$_SESSION['phpgw_info']['expressomail']['lang'])
12        {
13                $array_keys = array();
14                $fn = 'setup/phpgw_'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'.lang';                 
15                if (file_exists($fn)){
16                        $fp = fopen($fn,'r');
17                        while ($data = fgets($fp,16000))        {
18                                list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));                 
19                                $_SESSION['phpgw_info']['expressomail']['lang'][$message_id] =  $content;
20                        }
21                        fclose($fp);
22                }
23        }
24       
25        foreach($_SESSION['phpgw_info']['expressomail']['lang'] as $key => $value)
26                $script .= "array_lang['".str_replace("'","\'",strtolower($key))."'] = '".str_replace("'","\'",$value)."';\n";
27        echo "<script type='text/javascript'>$script</script>";
28?>
Note: See TracBrowser for help on using the repository browser.