All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gnu.gettext.GettextResource

java.lang.Object
   |
   +----java.util.ResourceBundle
           |
           +----gnu.gettext.GettextResource

public abstract class GettextResource
extends ResourceBundle
This class implements the main GNU libintl functions in Java.

Using the GNU gettext approach, compiled message catalogs are normal Java ResourceBundle classes and are thus interoperable with standard ResourceBundle based code.

The main differences between the Sun ResourceBundle approach and the GNU gettext approach are:

To compile GNU gettext message catalogs into Java ResourceBundle classes, the msgfmt program can be used.


Variable Index

 o verbose

Constructor Index

 o GettextResource()

Method Index

 o gettext(ResourceBundle, String)
Returns the translation of msgid.
 o ngettext(ResourceBundle, String, String, long)
Returns the plural form for n of the translation of msgid.

Variables

 o verbose
 public static boolean verbose

Constructors

 o GettextResource
 public GettextResource()

Methods

 o gettext
 public static String gettext(ResourceBundle catalog,
                              String msgid)
Returns the translation of msgid.

Parameters:
catalog - a ResourceBundle
msgid - the key string to be translated, an ASCII string
Returns:
the translation of msgid, or msgid if none is found
 o ngettext
 public static String ngettext(ResourceBundle catalog,
                               String msgid,
                               String msgid_plural,
                               long n)
Returns the plural form for n of the translation of msgid.

Parameters:
catalog - a ResourceBundle
msgid - the key string to be translated, an ASCII string
msgid_plural - its English plural form
Returns:
the translation of msgid depending on n, or msgid or msgid_plural if none is found

All Packages  Class Hierarchy  This Package  Previous  Next  Index