/", $term, $matches ) ) die( "Can't find term name in '$term'\n" ); $assocTerms[$matches[1]] = $term; } $enVar = $GLOBALS['en'.$section]; $langVar = $GLOBALS[$section]; foreach ( $enVar as $enName=>$enValue ) { if ( empty($langVar[$enName]) ) { print( "Got missing token '".$enName."'\n" ); $termPaddLen = max( $termOffset-(2+strlen($enName)), 0 ); $commPaddLen = max( $commOffset-(2+strlen($enValue)), 0 ); $assocTerms[$enName] = " '".$enName."'".str_repeat(" ",$termPaddLen)."=> '$enValue', ".str_repeat(" ",$commPaddLen)."// Added - $modDate"; } } foreach ( $langVar as $name=>$value ) { if ( empty($enVar[$name]) ) { print( "Got extraneous token '".$name."'\n" ); unset($assocTerms[$name]); } } ksort( $assocTerms, SORT_STRING ); $code = $fileParts[1].join( "\n", array_values($assocTerms) )."\n".rtrim($fileParts[3])."\n"; } ?>