-
-
15 Mar 2019 15:51:07 UTC
- Distribution: Locale-TextDomain-OO
- Module version: 1.027
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (346 / 0 / 1)
- Kwalitee
Bus factor: 1- 80.51% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (100.82KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Steffen Winkler <steffenw at cpan.org>
- Dependencies
- Carp
- Class::Load
- Clone
- Encode
- English
- Hash::Util
- JSON
- JSON::PP
- Locale::MO::File
- Locale::PO
- Locale::TextDomain::OO::Util
- Locale::TextDomain::OO::Util::ExtractHeader
- Locale::TextDomain::OO::Util::JoinSplitLexiconKeys
- Locale::Utils::PlaceholderBabelFish
- Locale::Utils::PlaceholderMaketext
- Locale::Utils::PlaceholderNamed
- Moo
- Moo::Role
- MooX::Singleton
- MooX::StrictConstructor
- MooX::Types::MooseLike::Base
- Path::Tiny
- Tie::Sub
- Try::Tiny
- namespace::autoclean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- VERSION
- DESCRIPTION
- SYNOPSIS
- SUBROUTINES/METHODS
- EXAMPLE
- DIAGNOSTICS
- CONFIGURATION AND ENVIRONMENT
- DEPENDENCIES
- INCOMPATIBILITIES
- BUGS AND LIMITATIONS
- SEE ALSO
- AUTHOR
- LICENSE AND COPYRIGHT
NAME
Locale::TextDomain::OO::Plugin::Expand::Maketext - Additional maketext methods
$Id: Maketext.pm 651 2017-05-31 18:10:43Z steffenw $
$HeadURL: svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Plugin/Expand/Maketext.pm $
VERSION
1.027
DESCRIPTION
This module provides additional maketext methods like Locale::Maketext::Simple to run that on projects that use Locale::Maketext at the moment.
To run maketext with different context (msgctxt) run method maketext_p.
SYNOPSIS
my $loc = Locale::Text::TextDomain::OO->new( plugins => [ qw ( Expand::Maketext ... )], ... );
Optional type formatting see Locale::Utils::PlaceholderMaketext for possible methods.
$loc->expand_maketext->formatter_code($code_ref);
SUBROUTINES/METHODS
method expand_maketext
Returns the Locale::Utils::PlaceholderMaketext object to be able to set some options.
my $expander_object = $self->expand_maketext;
translation methods
method maketext
This method includes the expansion as 'quant' or '*'.
print $loc->maketext( 'Hello World!', ); print $loc->maketext( 'Hello [_1]!', 'Steffen', ); print $loc->maketext( '[quant,_1,file read,files read]', $num_files, );
method maketext_p (allows the context)
print $loc->maketext_p ( 'time', 'to', ); print $loc->maketext_p ( 'destination', 'to', ); print $loc->maketext_p ( 'destination', 'from [_1] to [_2]', 'Chemnitz', 'Erlangen', ); print $loc->maketext_p( 'maskulin', 'Mr. [_1] has [*,_2,book,books].', $name, $books, );
methods Nmaketext, Nmaketext_p
The extractor looks for
maketext('...
and has no problem with<$loc-
Nmaketext('...>>.This is the idea of the N-Methods.
$loc->Nmaketext('...'); $loc->Nmaketext_p('...', '...');
EXAMPLE
Inside of this distribution is a directory named example. Run this *.pl files.
DIAGNOSTICS
confess
CONFIGURATION AND ENVIRONMENT
none
DEPENDENCIES
Locale::Utils::PlaceholderMaketext
INCOMPATIBILITIES
not known
BUGS AND LIMITATIONS
none
SEE ALSO
AUTHOR
Steffen Winkler
LICENSE AND COPYRIGHT
Copyright (c) 2009 - 2017, 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.
Module Install Instructions
To install Locale::TextDomain::OO, copy and paste the appropriate command in to your terminal.
cpanm Locale::TextDomain::OO
perl -MCPAN -e shell install Locale::TextDomain::OO
For more information on module installation, please visit the detailed CPAN module installation guide.