Changeset 2712 for trunk/phpgwapi/inc/class.expressolivre.inc.php
- Timestamp:
- 05/05/10 15:52:35 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.expressolivre.inc.php
r2704 r2712 27 27 ); 28 28 } 29 30 function lang( $param ) 31 { 32 $lang = ( array_key_exists( 'lang', $param ) ) ? $param[ 'lang' ] : false; 33 $module = ( array_key_exists( 'module', $param ) ) ? $param[ 'module' ] : false; 34 35 if ( ! ( $lang && $module ) ) 36 return '{}'; 37 38 $array_keys = array( ); 39 $fn = dirname( __FILE__ ) . "/../../{$module}/setup/phpgw_{$lang}.lang"; 40 $lang = array( ); 41 42 if ( file_exists( $fn ) ) 43 { 44 $fp = fopen( $fn, 'r' ); 45 while ( $data = fgets( $fp, 16000 ) ) 46 { 47 list( $message_id, $app_name, $null, $content ) = explode( "\t", substr( $data, 0, -1 ) ); 48 $lang[ ] = '"' . str_replace( '"', '\"', strtolower( $message_id ) ) . '" : "' . str_replace( '"', '\"', $content ) . '"'; 49 } 50 fclose( $fp ); 51 } 52 53 return '{' . implode( ",\n", $lang ) . '}'; 54 } 29 55 } 30 56
Note: See TracChangeset
for help on using the changeset viewer.