[sane-devel] help with improving text scans

Jeffrey Ratcliffe jeffrey.ratcliffe at gmail.com
Sat Dec 20 22:15:38 UTC 2008

2008/12/20 abel deuring <adeuring at gmx.net>:
> Just open sane's .mo file with gettext :) (OK, I'm more involved with
> the "competition" -- Python --, so I don't know if a gettext
> implementation for Perl exists, but I would be really suprised if it
> doesn't.)

Locale::gettext is the Perl module, which gscan2pdf uses for its own

use warnings;
use strict;
use Locale::gettext;
use POSIX;     # Needed for setlocale()
setlocale(LC_MESSAGES, "");
my $d = Locale::gettext->domain("sane-backends");
print $d->get("Preview"), "\n";


What I really meant is that scanimage doesn't seem to use SANE's
translations, which makes it difficult to provide a consistent
interface for the different frontends scanimage/scanadf/libsane-perl.

But you are right - I can get the English strings from scanimage, and
feed them through gettext. Unfortunately scanimage --help only gives
the option titles for the groups.

Can the backends be induced to give the option titles in some debug mode?



More information about the sane-devel mailing list