getMessage(), 0 ); } if( ! $mo ){ throw new Exception( sprintf( __('Failed to compile MO file with %s, check your settings','loco-legacy'), WHICH_MSGFMT ) ); } } // Fall back to in-built MO compiler - requires PO is parsed too else { $mo = LocoAdmin::msgfmt_native($po); } // exit with binary MO header('Content-Type: application/x-gettext-translation; charset=UTF-8', true ); header('Content-Length: '.strlen($mo), true ); header('Content-Disposition: attachment; filename='.$name, true ); echo $mo; exit(0); } catch( Exception $Ex ){ require dirname(__FILE__).'/loco-fatal.php'; }