source: branches/2.2/jabberit_messenger/inc/load_lang.php @ 3102

Revision 3102, 628 bytes checked in by amuller, 14 years ago (diff)

Ticket #986 - Efetuado merge para o Branch 2.2( atualizacao do modulo)

  • Property svn:executable set to *
Line 
1<?php
2
3if ( file_exists(($fn = dirname(__FILE__) . '/../setup/phpgw_pt-br.lang')) )
4        if ( ($fp = fopen($fn,'r')) )
5        {
6                while ($data = fgets($fp,16000))
7                {
8                        list($message_id, $app_name, $null, $content) = explode("\t",substr($data,0,-1));
9                        $LANG_IM[$message_id] = $content;
10                }
11                fclose($fp);
12        }
13
14$script  = '<script>function jabberitGetLang(pKey){';
15$script .= 'var lang = [];';
16
17foreach ( $LANG_IM as $key => $value )
18   $script .= "lang['" . strtolower(addslashes($key)) . "'] = '" . addslashes($value) . "';";
19
20$script .= "return lang[pKey.toLowerCase()] || '* ' + pKey;}</script>";
21
22echo $script;
23
24unset($LANG_IM);
25?>
Note: See TracBrowser for help on using the repository browser.