[1526] | 1 | <?php |
---|
[5509] | 2 | /*************************************************************************** |
---|
| 3 | * Expresso Livre * |
---|
| 4 | * http://www.expressolivre.org * |
---|
| 5 | * -------------------------------------------- * |
---|
| 6 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 7 | * under the terms of the GNU General Public License as published by the * |
---|
| 8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 9 | * option) any later version. * |
---|
| 10 | \**************************************************************************/ |
---|
| 11 | |
---|
[1526] | 12 | // Load the lang of the module. |
---|
| 13 | if(isset($offline_language)) { //Expresso offline, quando o gears sincroniza com uma nova versão, não é dado acesso as sessões do usuário, e é preciso o nome do arquivo de linguagens na session abaixo. |
---|
| 14 | $_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'] = $offline_language; |
---|
| 15 | } |
---|
| 16 | |
---|
[3152] | 17 | $array_keys = array(); |
---|
| 18 | $fn = 'setup/phpgw_'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'.lang'; |
---|
| 19 | if (file_exists($fn)){ |
---|
| 20 | $fp = fopen($fn,'r'); |
---|
| 21 | while ($data = fgets($fp,16000)){ |
---|
| 22 | list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); |
---|
| 23 | $expressomaillang[$message_id] = $content; |
---|
[3719] | 24 | $_SESSION['phpgw_info']['expressomail']['lang'][$message_id] = $content; |
---|
[1526] | 25 | } |
---|
[3152] | 26 | fclose($fp); |
---|
[1572] | 27 | } |
---|
| 28 | |
---|
[3152] | 29 | foreach($expressomaillang as $key => $value) |
---|
[1572] | 30 | $script .= "array_lang['".str_replace("'","\'",strtolower($key))."'] = '".str_replace("'","\'",$value)."';\n"; |
---|
[1526] | 31 | echo "<script type='text/javascript'>$script</script>"; |
---|
| 32 | ?> |
---|