json_file
write_trans
/;
our %EXPORT_TAGS = (
all => \@EXPORT_OK,
);
our $VERSION = '0.02';
use Table::Readable '0.05', qw!read_table read_table_hash!;
use JSON::Create 'write_json';
use JSON
;
}
return $trans;
}
sub trans_to_json_file
{
my ($trans_file, $json_file) = @_;
my $trans = read_trans ($trans_file);
write_json ($json_file, $trans, indent => 1, sort => 1);
}
s ($text, scalar => 1);
=head2 trans_to_json_file
trans_to_json_file ('file.txt', 'file.json');
Convert the translations in F<file.txt> into F<file.json>.
=head2 write_trans
write_trans
fatal error occurs.
=head1 DEPENDENCIES
=over
=item L<JSON::Create>
This is used for storing the translations in JSON format.
=item L<JSON::Parse>
This is only used by the tests.
=item L<Table: