MAKETEXT(1)

πŸ“¦
version 1.32 Β· 2 versions
, in fedora 43

πŸ’– MAKETEXT(1) πŸ’–

okay bestie, welcome to maketext β€” it lives in section 1 of the manual (User Contributed Perl Documentation, no cap), and it's literally the girl who translates ur messages and does the plural math for u. let's get into it ✨


🌸 NAME 🌸

maketext β€” translate and make messages πŸ¦‹


✨ SYNOPSIS ✨

maketext [OPTION] [--domain=TEXTDOMAIN] MSGKEY [PARAM...]
maketext [OPTION] -s MSGKEY [PARAM...]

πŸ’… DESCRIPTION πŸ’…

okay so the maketext script takes a natural language message and translates it into the user's language, by looking up the translation in a message MO file, and then it handles the plural transformation with Maketext. that's the whole vibe. πŸŽ€

maketext is a command-line interface to Locale::Maketext::Gettext(3) (and Locale::Maketext(3)). it can be used in shell scripts, etc, to translate, maketext and return the result. and the way that works is it enables Maketext to be integrated into other programming languages/systems, like bash/csh, python, PHP, C, etc. it works like the command-line program gettext. iconic honestly. πŸ‘‘

for example:

% maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 0 1
0 viruses were found in 1 file.
% maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 1 3
1 virus was found in 3 files.
%

see how it ate?? the plural agreement is doing its little main character moment. πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -d, --domain=TEXTDOMAIN β€” retrieve translated messages from TEXTDOMAIN.
  • -s β€” adds a new line to the end of the output so that it behaves like the echo or the gettext command.
  • -h, --help β€” display the help messages.
  • -V, --version β€” display version information and exit.
  • MSGKEY β€” the original text used to look up translated text.
  • PARAM... β€” parameters to Maketext for the plural and other text functions.

🌈 ENVIRONMENT 🌈

  • TEXTDOMAIN β€” TEXTDOMAIN is used to determine the text domain when the -d parameter is not given.
  • TEXTDOMAINDIR β€” TEXTDOMAINDIR is used to search the message catalog/MO file if it does not reside in the system locale directories.

πŸ¦‹ NOTES πŸ¦‹

Maketext language function override, like quant or numerate, is not available here. suggestions are welcome. πŸ™ˆ

the current system locale directory search order is: /usr/share/locale, /usr/lib/locale, /usr/local/share/locale, /usr/local/lib/locale. suggestions are welcome. (yes, that's the same "suggestions are welcome" twice β€” she said it, so we say it πŸ’œ)


πŸ’€ BUGS πŸ’€

report bugs to imacat <imacat@mail.imacat.idv.tw> β€” don't be shy, fr fr.


⭐ SEE ALSO ⭐

Locale::Maketext(3), Locale::Maketext::TPJ13(3), Locale::Maketext::Gettext(3), Locale::Maketext::Gettext::Functions(3), bindtextdomain(3), textdomain(3). also, please refer to the official GNU gettext manual at <https://www.gnu.org/software/gettext/manual/>.


πŸ‘‘ AUTHOR πŸ‘‘

imacat <imacat@mail.imacat.idv.tw>


Copyright (c) 2003-2021 imacat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page bestie!! this one's from perl v5.42.0, dated 2025-07-25, and it's your girl MAKETEXT(1) signing off πŸ’–βœ¨πŸŽ€ go translate something gorgeous πŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from