File: gettext.pl

package info (click to toggle)
dhelp 0.6.31
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 596 kB
  • sloc: ruby: 1,171; sh: 555; perl: 372; makefile: 83
file content (20 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Locale::gettext;
use POSIX;

my $gettext = Locale::gettext->domain_raw("dhelp");
$gettext->codeset('UTF-8'); # Always UTF-8, specified in the HTML templates

foreach my $locale (qw(
        de_DE.utf8
        el_GR.utf8
        es_ES.utf8
        eu_ES.utf8
        id_ID.utf8
        ru_RU.utf8
        fr_FR.utf8
    )) {
    setlocale(LC_MESSAGES, $locale);
    my $string = "No search database found.\nPlease run /etc/cron.weekly/dhelp as superuser to create it.";
    print "LOCALE $locale ============================\n";
    print $gettext->get($string), "\n";
}