The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

perl-Locale-Maketext-ManyPluralForms

Build Status codecov

INSTALLATION

To install this module, run the following commands:

perl Makefile.PL
make
make test
make install

NAME

Locale::Maketext::ManyPluralForms

SYNOPSIS

use Locale::Maketext::ManyPluralForms {'*' => ['Gettext' => 'i18n/*.po']};
my $lh = Locale::Maketext::ManyPluralForms->get_handle('en');
$lh->maketext("Hello");

DESCRIPTION

The implementation supporting internationalisation with many plural forms using Plural-Forms header from .po file to add plural method to Locale::Maketext based class. As described there http://www.perlmonks.org/index.pl?node_id=898687.

METHODS

Locale::Maketext::ManyPluralForms->import({'*' => ['Gettext' => 'i18n/*.po']})

This method to specify languages.

$self->plural($num, @strings)

This method handles plural forms. You can invoke it using Locale::Maketext's bracket notation, like "[plural,_1,string1,string2,...]". Depending on value of $num and language function returns one of the strings. If string contain %d it will be replaced with $num value.

SEE ALSO

Locale::Maketext, Locale::Maketext::Lexicon

COPYRIGHT AND LICENSE

Copyright (C) 2016 binary.com