source: companies/serpro/jabberit_messenger/inc/load_lang.php @ 903

Revision 903, 628 bytes checked in by niltonneto, 15 years ago (diff)

Importacao inicial do Expresso do Serpro

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.