GNU gettext utilities: AM_XGETTEXT_OPTION

From Get docs
Gettext/docs/latest/AM 005fXGETTEXT 005fOPTION

Next: AM_ICONV, Previous: AM_PO_SUBDIRS, Up: autoconf macros   [Contents][Index]



13.5.5 AM_XGETTEXT_OPTION in po.m4

The AM_XGETTEXT_OPTION macro registers a command-line option to be used in the invocations of xgettext in the po/ directories of the package.

For example, if you have a source file that defines a function ‘error_at_line’ whose fifth argument is a format string, you can use

AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])

to instruct xgettext to mark all translatable strings in ‘gettext’ invocations that occur as fifth argument to this function as ‘c-format’.

See xgettext Invocation for the list of options that xgettext accepts.

The use of this macro is an alternative to the use of the ‘XGETTEXT_OPTIONS’ variable in po/Makevars.