Same as export, but writes the result to a file
Parameters
$filename
stringrequired- Where to write the PO string.
$include_headers
booloptional- Whether to include the headers in the export.
Default:
true
Source
public function export_to_file( $filename, $include_headers = true ) {
$fh = fopen( $filename, 'w' );
if ( false === $fh ) {
return false;
}
$export = $this->export( $include_headers );
$res = fwrite( $fh, $export );
if ( false === $res ) {
return false;
}
return fclose( $fh );
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.