Group
Extension

Matches 3

App-I18N ( C/CO/CORNELIUS/App-I18N-0.034.tar.gz, CORNELIUS, 2011; MetaCPAN )
App-I18N/lib/App/I18N.pm ( view source; MetaCPAN )
ile::Path qw/mkpath/;
use Locale::Maketext::Extract;
use Getopt::Long;
use Exporter 'import';
use JSON::XS;
use YAML::XS;
use File::Basename;
use Locale::Maketext::Extract;
use App::I18N::Logger;
use 
Plugin::PPI' => [ 'pm','pl' ],
            'tt2' => [ ],
            # 'perl' => ['pl','pm','js','json'],
            'perl' => [ '*' ],   # _( ) , gettext( ) , loc( ) ...
            'mason' => [ ] ,
App-I18N ( C/CO/CORNELIUS/App-I18N-0.034.tar.gz, CORNELIUS, 2011; MetaCPAN )
App-I18N/lib/App/I18N/Command/Gen.pm ( view source; MetaCPAN )
d" => "msgstr"
        ....
    );
    ?>
    ....

For JSON

    en.json:
    {
        "msgid..." : "msgstr"
        ...
    };

    zh_tw.json:
    {
        ....
    };

Static JS

    var dict;
 
g) = ($pofile =~ m{(\w+)\.po$} );   # get en_US or zh_TW ... etc
            my $ext = $type;  # "json , js, pl, pm, php";
            my $outfile = File::Spec->join( $output_dir , "$lang.$ext" );

  
   if( $type eq 'json' ) {
                use JSON::XS;
                print FH encode_json( \%entries );
            }
            elsif ( $type eq 'js' ) {
                use JSON::XS;
          
App-I18N ( C/CO/CORNELIUS/App-I18N-0.034.tar.gz, CORNELIUS, 2011; MetaCPAN )
App-I18N/lib/App/I18N/DB.pm ( view source; MetaCPAN )
t_lexicon( $lexicon );
    $lme->write_po($pofile);
}

=pod
package MsgEntry;
use Any::Moose;
use JSON::XS;
use overload 
    '""' => \&to_string,
    '%{}' => \&to_hash;


has id => ( is => 'rw', isa
lang     => $self->lang,
        msgid    => $self->msgid,
        msgstr   => $self->msgstr,
    );
}

sub to_string {
    my $self = shift;
    return encode_json( { $self->to_hash } );
}
=cut


1;

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.