+2007-09-01 Bruno Haible <bruno@clisp.org>
+
+ Implement msgctxt for Java ResourceBundles.
+ * gettext.texi (Java): Mention pgettext and npgettext.
+ * xgettext.texi (--keyword): Update defaults for Java.
+ Suggested by Felix Berger.
+
2007-08-18 Bruno Haible <bruno@clisp.org>
* gettext.texi (Why): Don't oppose commercial software to free
_("abc")
@item gettext/ngettext functions
-@code{GettextResource.gettext}, @code{GettextResource.ngettext}
+@code{GettextResource.gettext}, @code{GettextResource.ngettext},
+@code{GettextResource.pgettext}, @code{GettextResource.npgettext}
@item textdomain
---, use @code{ResourceBundle.getResource} instead
@item
The @code{gnu.gettext.GettextResource} API.
-Reference documentation in Javadoc 1.1 style format
-is in the @uref{javadoc1/tree.html,javadoc1 directory} and
-in Javadoc 2 style format
-in the @uref{javadoc2/index.html,javadoc2 directory}.
+Reference documentation in Javadoc 1.1 style format is in the
+@uref{javadoc2/index.html,javadoc2 directory}.
Its @code{gettext} function returns a string translation. Note that when
a translation is missing, the @var{msgid} argument is returned unchanged.
This has the advantage of having the @code{ngettext} function for plural
-handling.
+handling and the @code{pgettext} and @code{npgettext} for strings constraint
+to a particular context.
@cindex @code{libintl} for Java
To use this API, one needs the @code{libintl.jar} file which is part of
@item
For Java: @code{GettextResource.gettext:2},
-@code{GettextResource.ngettext:2,3}, @code{gettext}, @code{ngettext:1,2},
-@code{getString}.
+@code{GettextResource.ngettext:2,3}, @code{GettextResource.pgettext:2c,3},
+@code{GettextResource.npgettext:2c,3,4}, @code{gettext}, @code{ngettext:1,2},
+@code{pgettext:1c,2}, @code{npgettext:1c,2,3}, @code{getString}.
@item
For C#: @code{GetString}, @code{GetPluralString:1,2}.