qbit::GetText
Functions to internatilization application.
More information on GNU.org.
qbit::GetText use pure perl version of gettext by default. If you need to use XS version, set envirement variable FORCE_GETTEXT_XS to TRUE;
Arguments:
$text - string, message;
@params - array of strings, placeholders.
Return value: string, localized message.
$plural - string, plural form of message;
$n - number, quantity of something;
$context - string, message context;
Deffered versions of *gettext functions.
my $s = d_ngettext('site', 'sites', 1); # equivalent my $s = sub {ngettext('site', 'sites', 1)};
Arguments as hash:
lang - string, locale (ru_RU, en_UK, ...);
path - string, path to locales;
project - string, project name.
Path with locales must be $opts{'path'}/$opts{'lang'}/LC_MESSAGES/$opts{'project'}.mo.
$opts{'path'}/$opts{'lang'}/LC_MESSAGES/$opts{'project'}.mo
To install qbit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm qbit
CPAN shell
perl -MCPAN -e shell install qbit
For more information on module installation, please visit the detailed CPAN module installation guide.