Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Locale::Maketext::Lexicon 0.91

    Download button

    No screenshots available
    Downloads: 327  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Audrey Tang | More programs
    MIT/X Consortium Lic... / FREE
    January 17th, 2012, 09:46 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Locale::Maketext::Lexicon description

    A Perl module to use other catalog formats in Maketext.

    Locale::Maketext::Lexicon is a Perl module to use other catalog formats in Maketext.

    SYNOPSIS

    As part of a localization class, automatically glob for available lexicons:

    package Hello::I18N;
    use base 'Locale::Maketext';
    use Locale::Maketext::Lexicon {
    '*' => [Gettext => '/usr/local/share/locale/*/LC_MESSAGES/hello.mo'],
    ### Uncomment to decode lexicon entries into Unicode strings
    # _decode => 1,
    ### Uncomment to fallback when a key is missing from lexicons
    # _auto => 1,
    ### Uncomment to use %1 / %quant(%1) instead of [_1] / [quant, _1]
    # _style => 'gettext',
    };
    Explicitly specify languages, during compile- or run-time:
    package Hello::I18N;
    use base 'Locale::Maketext';
    use Locale::Maketext::Lexicon {
    de => [Gettext => 'hello_de.po'],
    fr => [
    Gettext => 'hello_fr.po',
    Gettext => 'local/hello/fr.po',
    ],
    };
    # ... incrementally add new lexicons
    Locale::Maketext::Lexicon->import({
    de => [Gettext => 'local/hello/de.po'],
    })

    Alternatively, as part of a localization subclass:

    package Hello::I18N::de;
    use base 'Hello::I18N';
    use Locale::Maketext::Lexicon (Gettext => *DATA);
    __DATA__
    # Some sample data
    msgid ""
    msgstr ""
    "Project-Id-Version: Hello 1.3.22.1n"
    "MIME-Version: 1.0n"
    "Content-Type: text/plain; charset=iso8859-1n"
    "Content-Transfer-Encoding: 8bitn"

    #: Hello.pm:10
    msgid "Hello, World!"
    msgstr "Hallo, Welt!"

    #: Hello.pm:11
    msgid "You have %quant(%1,piece) of mail."
    msgstr "Sie haben %quant(%1,Poststueck,Poststuecken)."


    This module provides lexicon-handling modules to read from other localization formats, such as Gettext, Msgcat, and so on.

    If you are unfamiliar with the concept of lexicon modules, please consult Locale::Maketext and http://www.autrijus.org/webl10n/ first.

    A command-line utility xgettext.pl is also installed with this module, for extracting translatable strings from source files.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    catalog formats | Maketext catalog | Perl module | module | Maketext | catalog

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM