I'm trying to localize a module. I'm using Locale::TextDomain and Dist::Zilla::LocalTextDomain to manage it.
The module is available at https://github.com/mla/time-ago
I've added a French translation but I can't seem to trigger the translation.
I'm following this tutorial: http://perladvent.org/2013/2013-12-09.html
Compiling of the .po files seems to work fine:
$ dzil msg-compile po/fr.po [LocaleTextDomain] po/fr.po: 9 translated messages, 2 untranslated mes +sages.
But then I try to test it using the example from the tutorial, and I get English:
$ LANGUAGE=fr perl -Ilib -CAS -I. ./try about 3 hours
Here's the script:
#!/usr/bin/env perl use strict; use Time::Ago; print Time::Ago->in_words(3600 * 3.2), "\n";
Here's the .po translation that should apply there:
#: lib/Time/Ago.pm:47 #, perl-brace-format msgid "about {count} hour" msgid_plural "about {count} hours" msgstr[0] "environ une heure" msgstr[1] "environ {count} heures"
What am I missing?
In reply to getting Locale::TextDomain working by mla12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |