Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if ( 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 | |
---|
17 | foreach ( $LANG_IM as $key => $value ) |
---|
18 | $script .= "lang['" . strtolower(addslashes($key)) . "'] = '" . addslashes($value) . "';"; |
---|
19 | |
---|
20 | $script .= "return lang[pKey.toLowerCase()] || '* ' + pKey;}</script>"; |
---|
21 | |
---|
22 | echo $script; |
---|
23 | |
---|
24 | unset($LANG_IM); |
---|
25 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.