lib/CPAN/lib/Locale/Maketext/Lexicon/Auto.pm
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lib/CPAN/lib/Locale/Maketext/Lexicon/Auto.pm	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +package Locale::Maketext::Lexicon::Auto;
     1.5 +$Locale::Maketext::Lexicon::Auto::VERSION = '0.02';
     1.6 +
     1.7 +use strict;
     1.8 +
     1.9 +=head1 NAME
    1.10 +
    1.11 +Locale::Maketext::Lexicon::Auto - Auto fallback lexicon for Maketext
    1.12 +
    1.13 +=head1 SYNOPSIS
    1.14 +
    1.15 +    package Hello::I18N;
    1.16 +    use base 'Locale::Maketext';
    1.17 +    use Locale::Maketext::Lexicon {
    1.18 +        en => ['Auto'],
    1.19 +        # ... other languages
    1.20 +    };
    1.21 +
    1.22 +=head1 DESCRIPTION
    1.23 +
    1.24 +This module builds a simple Lexicon hash that contains nothing but
    1.25 +C<( '_AUTO' =E<gt> 1)>, which tells C<Locale::Maketext> that no
    1.26 +localizing is needed -- just use the lookup key as the returned string.
    1.27 +
    1.28 +It is especially useful if you're starting to prototype a program, and
    1.29 +do not want to deal with the localization files yet.
    1.30 +
    1.31 +=head1 CAVEATS
    1.32 +
    1.33 +If the key to C<-E<gt>maketext> begins with a C<_>, C<Locale::Maketext>
    1.34 +will still throw an exception.  See L<Locale::Maketext/CONTROLLING LOOKUP
    1.35 +FAILURE> for how to prevent it.
    1.36 +
    1.37 +=cut
    1.38 +
    1.39 +sub parse {
    1.40 +    return { _AUTO => 1 };
    1.41 +}
    1.42 +
    1.43 +1;
    1.44 +
    1.45 +=head1 SEE ALSO
    1.46 +
    1.47 +L<Locale::Maketext>, L<Locale::Maketext::Lexicon>
    1.48 +
    1.49 +=head1 AUTHORS
    1.50 +
    1.51 +Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>
    1.52 +
    1.53 +=head1 COPYRIGHT
    1.54 +
    1.55 +Copyright 2002, 2003, 2004 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.
    1.56 +
    1.57 +This program is free software; you can redistribute it and/or 
    1.58 +modify it under the same terms as Perl itself.
    1.59 +
    1.60 +See L<http://www.perl.com/perl/misc/Artistic.html>
    1.61 +
    1.62 +=cut