Revision 3719,
1021 bytes
checked in by eduardoalex, 14 years ago
(diff) |
Ticket #1507 - expressoMail1_2 - Adicionado array que obtem as traduções.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[1526] | 1 | <?php |
---|
| 2 | // Load the lang of the module. |
---|
| 3 | 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. |
---|
| 4 | $_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'] = $offline_language; |
---|
| 5 | } |
---|
| 6 | |
---|
[3152] | 7 | $array_keys = array(); |
---|
| 8 | $fn = 'setup/phpgw_'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'.lang'; |
---|
| 9 | if (file_exists($fn)){ |
---|
| 10 | $fp = fopen($fn,'r'); |
---|
| 11 | while ($data = fgets($fp,16000)){ |
---|
| 12 | list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); |
---|
| 13 | $expressomaillang[$message_id] = $content; |
---|
[3719] | 14 | $_SESSION['phpgw_info']['expressomail']['lang'][$message_id] = $content; |
---|
[1526] | 15 | } |
---|
[3152] | 16 | fclose($fp); |
---|
[1572] | 17 | } |
---|
| 18 | |
---|
[3152] | 19 | foreach($expressomaillang as $key => $value) |
---|
[1572] | 20 | $script .= "array_lang['".str_replace("'","\'",strtolower($key))."'] = '".str_replace("'","\'",$value)."';\n"; |
---|
[1526] | 21 | echo "<script type='text/javascript'>$script</script>"; |
---|
| 22 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.