1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
# This program is distributed under the terms of the
# GNU General Public License, version 2.
#
# $Id: L10N.pm 1174 2008-01-08 21:02:50Z bchoate $
package MT::L10N;
use strict;
use Locale::Maketext;
@MT::L10N::ISA = qw( Locale::Maketext );
@MT::L10N::Lexicon = (
_AUTO => 1,
);
sub language_name {
my $tag = $_[0]->language_tag;
require I18N::LangTags::List;
return I18N::LangTags::List::name($tag);
}
sub encoding { 'iso-8859-1' } ## Latin-1
sub ascii_only { 0 }
sub lc {
my $lh = shift;
require MT::I18N;
MT::I18N::lowercase(@_);
}
sub uc {
my $lh = shift;
require MT::I18N;
MT::I18N::uppercase(@_);
}
1;
__END__
=head1 NAME
MT::L10N
=head1 METHODS
=head2 $obj->language_name($code)
Return the value of L<I18N::LangTags::List/name> for the given I<code>.
=head2 encoding
Return 'iso-8859-1' (Latin-1).
=head2 ascii_only
Return zero.
=head1 AUTHOR & COPYRIGHT
Please see L<MT/AUTHOR & COPYRIGHT>.
=cut
|