We added gettext support for the Perl code in libguestfs today. We used libintl-perl which is pleasantly simple to use, and works well with our existing C-based i18n infrastructure.
To translate a file, we just add this at the top:
use Locale::TextDomain ‘libguestfs’;
and we mark strings as potentially translatable just by prefixing them with a double [...]