ManaTools::Shared::Locales

Section: User Contributed Perl Documentation (3)
Updated: 2017-07-06
Page Index
 

NAME

ManaTools::Shared::Locales - Class to manage locales  

SYNOPSIS

use ManaTools::Shared::Locales;

my $obj = ManaTools::Shared::Locales->new(domain_name => 'this_domain');

print $obj->N(``test string %d'', 1) . ``\n'';  

DESCRIPTION

This class wraps Locale::gettext to manage localization  

SUPPORT

You can find documentation for this module with the perldoc command:

perldoc ManaTools::Shared::Locales  

SEE ALSO

Locale::gettext Text::Iconv and gettext  

AUTHOR

Angelo Naselli <anaselli@linux.it>  

COPYRIGHT and LICENSE

Copyright (C) 2014-2016, Angelo Naselli.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  

FUNCTIONS

 

new

INPUT

    hash ref containing
        domain_name: gettext domain name (default mpan)
        dir_name:    gettext optional catalog directory (default undef)
        codeset:     gettext codeset (default UTF8)

DESCRIPTION

    new is inherited from Moose, to create a Locales object

 

BUILD

INPUT

    $self: this object

DESCRIPTION

    The BUILD method is called after a Moose object is created.
    This method  initilaizes gettext domain.

 

P

INPUT

    $self :      this object
    $s_singular: msg id singular
    $s_plural:   msg id plural
    $nb:         value for plural

OUTPUT

    locale string

DESCRIPTION

    returns the given string localized (see dngettext)

 

N

INPUT

    $self : this object
    $s:     msg id

OUTPUT

    locale string

DESCRIPTION

    returns the given string localized (see dgettext)

 

N_

INPUT

    $self : this object
    $s:     msg id

OUTPUT

    msg id

DESCRIPTION

    returns the given string

 

from_utf8

INPUT

    $self: this object
    $s:    string to be converted

OUTPUT

    $converted: converted string

DESCRIPTION

    convert from utf-8 to current locale

 

to_utf8

INPUT

    $self: this object
    $s:    string to be converted

OUTPUT

    $converted: converted string

DESCRIPTION

    convert to utf-8 from current locale


 

Index

NAME
SYNOPSIS
DESCRIPTION
SUPPORT
SEE ALSO
AUTHOR
COPYRIGHT and LICENSE
FUNCTIONS
new
BUILD
P
N
N_
from_utf8
to_utf8
LinuxReviews : manual page archive : man3pm