Locale-Maketext-Simple

Locale::Maketext::Simple(3p) Perl Programmers Reference Guide

Locale-Maketext-Simple

Locale::Maketext::Simple(3p) Perl Programmers Reference Guide # Locale::Maketext::Simple(3p) Perl Programmers Reference Guide NNAAMMEE # Locale::Maketext::Simple - Simple interface to Locale::Maketext::Lexicon VVEERRSSIIOONN # This document describes version 0.18 of Locale::Maketext::Simple, released Septermber 8, 2006. SSYYNNOOPPSSIISS # Minimal setup (looks for _a_u_t_o_/_F_o_o_/_*_._p_o and _a_u_t_o_/_F_o_o_/_*_._m_o): package Foo; use Locale::Maketext::Simple; # exports 'loc' loc_lang('fr'); # set language to French sub hello { print loc("Hello, [_1]!", "World"); } More sophisticated example: package Foo::Bar; use Locale::Maketext::Simple ( Class => 'Foo', # search in auto/Foo/ Style => 'gettext', # %1 instead of [_1] Export => 'maketext', # maketext() instead of loc() Subclass => 'L10N', # Foo::L10N instead of Foo::I18N Decode => 1, # decode entries to unicode-strings Encoding => 'locale', # but encode lexicons in current locale # (needs Locale::Maketext::Lexicon 0. ...