updating copyright
[gitmo/moose-website.git] / lib / Moose / Website / I18N.pm
1 package Moose::Website::I18N;
2 use Moose;
3
4 use Path::Class;
5
6 our $VERSION   = '0.01';
7 our $AUTHORITY = 'cpan:STEVAN';
8
9 BEGIN { extends 'Locale::Maketext' };
10
11 use Locale::Maketext::Lexicon {
12     '*'     => [ Gettext => file(__FILE__)->parent->file("I18N", "po", "*.po")->stringify ],
13     _auto   => 1,
14     _decode => 1,
15 };
16
17 sub loc {
18     my ( $self, $item, @args ) = @_;
19
20     if ( @args == 0 and ref($item) eq 'ARRAY') {
21         ( $item, @args ) = @$item;
22     }
23
24     return $self->maketext( $item, @args );
25 }
26
27 __PACKAGE__->meta->make_immutable( inline_constructor => 0 );
28
29 no Moose; 1;
30
31 __END__
32
33 =pod
34
35 =head1 NAME
36
37 Moose::Website::I18N - A Moosey solution to this problem
38
39 =head1 SYNOPSIS
40
41   use Moose::Website::I18N;
42
43 =head1 DESCRIPTION
44
45 =head1 METHODS
46
47 =over 4
48
49 =item B<>
50
51 =back
52
53 =head1 BUGS
54
55 All complex software has bugs lurking in it, and this module is no
56 exception. If you find a bug please either email me, or add the bug
57 to cpan-RT.
58
59 =head1 AUTHOR
60
61 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
62
63 =head1 COPYRIGHT AND LICENSE
64
65 Copyright 2010 Infinity Interactive, Inc.
66
67 L<http://www.iinteractive.com>
68
69 This library is free software; you can redistribute it and/or modify
70 it under the same terms as Perl itself.
71
72 =cut