Locale::TextDomain::OO::Lexicon::Role::File - Helper role to add lexicon from file
$Id: File.pm 546 2014-10-31 09:35:19Z steffenw $
1.014
This module provides methods to inplmement lexicon from file easy.
with qw( Locale::TextDomain::OO::Lexicon::Role::File );
Allows to implement your own way of decode messages. Add a code ref in constructor.
decode_code => sub { my ($charset, $text) = @_; defined $text or return $text;
return decode( $charset, $text ); },
$self->lexicon_ref({ # required search_dirs => [ qw( ./my_dir ./my_other_dir ) ], # optional gettext_to_maketext => $boolean, # optional decode => $boolean, # required data => [ # e.g. de.mo, en.mo read from: # search_dir/de.mo # search_dir/en.mo '*::' => '*.mo',
# e.g. de.mo en.mo read from: # search_dir/subdir/de/LC_MESSAGES/domain.mo # search_dir/subdir/en/LC_MESSAGES/domain.mo '*:LC_MESSAGES:domain' => 'subdir/*/LC_MESSAGES/domain.mo',
# Merge a region lexicon: # Take the header and messages of the "de::" lexicon, # overwrite the header and messages of the "de-at::" lexicon # and store that as "de-at::" lexicon with all messages now. merge_lexicon => 'de::', 'de-at::' => 'de-at::',
# Move a lexicon into another domain and/or category: move_lexicon => 'i-default::' => 'i-default:LC_MESSAGES:domain',
# Delete a lexicon: delete_lexicon => 'i-default::', ], });
Inside of this distribution is a directory named example. Run this *.pl files.
confess
none
Locale::TextDomain::OO::Singleton::Lexicon
Locale::TextDomain::OO::Util::ExtractHeader
Locale::TextDomain::OO::Util::JoinSplitLexiconKeys
Locale::TextDomain::OO::Lexicon::Role::GettextToMaketext
Locale::TextDomain::OO::Role::Logger
not known
none
Steffen Winkler
Copyright (c) 2013 - 2014,
Steffen Winkler
<steffenw at cpan.org>
.
All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.