Log::R...ettext(3pm)

πŸ’– NAME πŸ’–

ok so bestie, welcome to Log::Report::Translator::Gettext β€” the GNU gettext infrastructure, but make it perl πŸŽ€


🌸 INHERITANCE 🌸

the family tree moment, periodt:

Log::Report::Translator::Gettext
  is a Log::Report::Translator

✨ SYNOPSIS ✨

here's the whole vibe, two ways β€” end-user girly and internal gremlin mode πŸ¦‹

# normal use (end-users view)

textdomain 'my-domain',
  translator => Log::Report::Translator::Gettext->new;

print __"Hello World\n";  # language determined by environment

# internal use

my $msg = Log::Report::Message->new(
  _msgid      => "Hello World\n",
  _textdomain => 'my-domain',
);

print Log::Report::Translator::Gettext->new
    ->translate($msg, 'nl-BE');

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so first thing, listen: UNTESTED!!! PLEASE CONTRIBUTE!!! 😭 like genuinely, she is not ready, she needs you. What she does is translate a message using the GNU gettext infrastructure πŸ’…

Guido Flohr reports: be aware that Locale::gettext is only a binding for the C library libintl and depends on its features. That means that your module will effectively only run on GNU systems and maybe on Solaris (depending on the exact version), because only these systems provide the plural handling functions ngettext(), dngettext() and dcngettext(). Sooner or later you will probably also need bind_textdomain_codeset() which is also only available on certain systems. πŸ’€

Extends "DESCRIPTION" in Log::Report::Translator.

ngl bestie, "only on GNU systems" is not a vibe check she passes everywhere β€” read that warning again before you ship πŸ”₯

🧚 METHODS 🧚

Extends "METHODS" in Log::Report::Translator.

πŸ“ Constructors

Extends "Constructors" in Log::Report::Translator.

  • $class->new(%options) β€” inherited, see "Constructors" in Log::Report::Translator

🌈 Accessors

Extends "Accessors" in Log::Report::Translator.

πŸ’œ Translating

Extends "Translating" in Log::Report::Translator.

  • $obj->load($domain, $locale) β€” inherited, see "Translating" in Log::Report::Translator
  • $obj->translate($msg, $lang, $ctxt) β€” inherited, see "Translating" in Log::Report::Translator

πŸ”₯ SEE ALSO πŸ”₯

This module is part of Log-Report-Lexicon version 1.15, built on November 06, 2025. Website: http://perl.overmeer.net/CPAN/ ⭐


πŸŽ€ LICENSE πŸŽ€

For contributors see file ChangeLog.

This software is copyright (c) 2007-2025 by Mark Overmeer.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie 🫢 β€” she ships as part of perl v5.40.1, dated 2025-11-11, in the Log::R...ettext(3pm) manual. mwah πŸ’‹ slay πŸ’…βœ¨

πŸ“¦ where this page comes from