diff options
author | Bruno Haible <bruno@clisp.org> | 2006-04-03 11:36:51 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:13:07 +0200 |
commit | 09b5b3c90ce81356f46070a7d8a069f1d1563983 (patch) | |
tree | a4a0d003d136ae392ab82f74f14005e85b0609cf /gettext-tools/doc/gettext.texi | |
parent | 84a29876b9f2e0f862fcd2920a9a599afcfd04a6 (diff) | |
download | external_gettext-09b5b3c90ce81356f46070a7d8a069f1d1563983.zip external_gettext-09b5b3c90ce81356f46070a7d8a069f1d1563983.tar.gz external_gettext-09b5b3c90ce81356f46070a7d8a069f1d1563983.tar.bz2 |
Add pgettext variants that accept expressions.
Diffstat (limited to 'gettext-tools/doc/gettext.texi')
-rw-r--r-- | gettext-tools/doc/gettext.texi | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index fb8ed36..28b1b10 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -5036,6 +5036,26 @@ pgettext ("Menu|Printer|", "Connect") Whether or not to use the @samp{|} character at the end of the context is a matter of style. +For more complex cases, where the @var{msgctxt} or @var{msgid} are not +string literals, more general macros are available: + +@findex pgettext_expr +@findex dpgettext_expr +@findex dcpgettext_expr +@example +const char *pgettext_expr (const char *msgctxt, const char *msgid); +const char *dpgettext_expr (const char *domain_name, + const char *msgctxt, const char *msgid); +const char *dcpgettext_expr (const char *domain_name, + const char *msgctxt, const char *msgid, + int category); +@end example + +Here @var{msgctxt} and @var{msgid} can be arbitrary string-valued expressions. +These macros are more general. But in the case that both argument expressions +are string literals, the macros without the @samp{_expr} suffix are more +efficient. + @node Plural forms, Optimized gettext, Contexts, gettext @subsection Additional functions for plural forms @cindex plural forms |