diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-02-19 13:35:33 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-02-19 16:09:43 -0600 |
commit | 7daaaab84d59665bd34b01d8eed61ac0e53c435a (patch) | |
tree | c6e5bd573e888058f41167579d5360ba5f3b3847 | |
parent | 8d09a801541287ac0c3fc20ed7a16eef765f0759 (diff) | |
download | locale-pofilemanager-7daaaab84d59665bd34b01d8eed61ac0e53c435a.tar.gz locale-pofilemanager-7daaaab84d59665bd34b01d8eed61ac0e53c435a.zip |
add a language_file method to get a specific language file
-rw-r--r-- | lib/Locale/POFileManager.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Locale/POFileManager.pm b/lib/Locale/POFileManager.pm index ea906c1..4665723 100644 --- a/lib/Locale/POFileManager.pm +++ b/lib/Locale/POFileManager.pm @@ -126,15 +126,20 @@ sub add_language { $self->_add_file($pofile); } -sub canonical_language_file { +sub language_file { my $self = shift; - my $lang = $self->canonical_language; + my ($lang) = @_; return $self->first_file(sub { $_->language eq $lang; }); } +sub canonical_language_file { + my $self = shift; + return $self->language_file($self->canonical_language); +} + sub find_missing { my $self = shift; my $canon_file = $self->canonical_language_file; |