source: branches/1.2/jabberit_messenger/inc/load_lang.php @ 417

Revision 417, 628 bytes checked in by niltonneto, 16 years ago (diff)

Vide changelog do módulo.
http://www.expressolivre.org/dev/wiki/jabberit/changelog
Alterações feitas por Alexandre Correia
email: alexandrecorreia@…

  • 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.