~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/lib/CPAN/lib/Locale/Maketext/Lexicon/Auto.pm

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Locale::Maketext::Lexicon::Auto;
 
2
$Locale::Maketext::Lexicon::Auto::VERSION = '0.02';
 
3
 
 
4
use strict;
 
5
 
 
6
=head1 NAME
 
7
 
 
8
Locale::Maketext::Lexicon::Auto - Auto fallback lexicon for Maketext
 
9
 
 
10
=head1 SYNOPSIS
 
11
 
 
12
    package Hello::I18N;
 
13
    use base 'Locale::Maketext';
 
14
    use Locale::Maketext::Lexicon {
 
15
        en => ['Auto'],
 
16
        # ... other languages
 
17
    };
 
18
 
 
19
=head1 DESCRIPTION
 
20
 
 
21
This module builds a simple Lexicon hash that contains nothing but
 
22
C<( '_AUTO' =E<gt> 1)>, which tells C<Locale::Maketext> that no
 
23
localizing is needed -- just use the lookup key as the returned string.
 
24
 
 
25
It is especially useful if you're starting to prototype a program, and
 
26
do not want to deal with the localization files yet.
 
27
 
 
28
=head1 CAVEATS
 
29
 
 
30
If the key to C<-E<gt>maketext> begins with a C<_>, C<Locale::Maketext>
 
31
will still throw an exception.  See L<Locale::Maketext/CONTROLLING LOOKUP
 
32
FAILURE> for how to prevent it.
 
33
 
 
34
=cut
 
35
 
 
36
sub parse {
 
37
    return { _AUTO => 1 };
 
38
}
 
39
 
 
40
1;
 
41
 
 
42
=head1 SEE ALSO
 
43
 
 
44
L<Locale::Maketext>, L<Locale::Maketext::Lexicon>
 
45
 
 
46
=head1 AUTHORS
 
47
 
 
48
Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>
 
49
 
 
50
=head1 COPYRIGHT
 
51
 
 
52
Copyright 2002, 2003, 2004 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.
 
53
 
 
54
This program is free software; you can redistribute it and/or 
 
55
modify it under the same terms as Perl itself.
 
56
 
 
57
See L<http://www.perl.com/perl/misc/Artistic.html>
 
58
 
 
59
=cut