xgettext-perl - extract translatable strings
xgettext-perl [GENERIC OPTIONS][SCRIPT OPTIONS] directories xgettext-perl [GENERIC OPTIONS][TEMPLATE OPTIONS] directories GENERIC OPTIONS --config -c %config domain configuration --files-from -f $filename source of filenames to be processed --from-code $charset used by input files (default utf-8) --no-cleanup keep unprocessed files in po table --output-dir -p $directory location of lexicons (required) --to-code $charset charset of po files (default utf-8) --version -V show version of this script --verbose=3 -v -vv -vvv debug mode TEMPLATE OPTIONS --domain -d $domain domain to be used --template -t $notation how to recognize the strings to be taken --files-match -m $regex filter filenames, default .pm and .pl SCRIPT OPTIONS --language -L $proglang programming language syntax (now only perl) --files-match -m $regex filter filenames, default .tt and .tt2
This script will maintain PO-files: translation files. On the moment, the number of syntaxes is quite limited (see below) There is no restrain on syntaxes which can be supported: there just was no practical use to implement it yet.
Log::Report translations supports complex additional features, like context sensitive translations, which require a configuration file. See Log::Report::Context
Say, your scripts and templates use textdomain name-spaces domain1 and domain2 (plase use better names), then you can pass their respective configuration files as:
domain1
domain2
--config domain1=filename domain2=filename # or --config domain1=filename --config domain2=filename
You should scan all script or template files in one go, because PO records from files which are not mentioned will get removed. That's the clean-up. However, when you need more scans for a full update, you need to use this option. This also implies possible polution of your translation tables.
When no --template notation is given, the provided file-names are expected to contain program text. Only Perl5 programs using the Log::Report msgid notation (with leading '__' to mean gettext)
See Log::Report::Extract::Template
To install Log::Report::Lexicon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Report::Lexicon
CPAN shell
perl -MCPAN -e shell install Log::Report::Lexicon
For more information on module installation, please visit the detailed CPAN module installation guide.