  
  
  Class   
    ../../overview-tree.htmlTree    
    ../../deprecated-list.htmlDeprecated    
    ../../index-all.htmlIndex    
    ../../help-doc.htmlHelp    
 PREV CLASS 
 NEXT CLASS
  
../../index.htmlFRAMES    
 
GettextResource.htmlNO FRAMES   SUMMARY:  INNER | 
#field_summaryFIELD  | #constructor_summaryCONSTR  | #method_summaryMETHOD DETAIL:  
#field_detailFIELD  | #constructor_detailCONSTR  | #method_detailMETHOD gnu.gettext
Class  GettextResource
java.lang.Object
  |
  +--java.util.ResourceBundle
        |
        +--
gnu.gettext.GettextResourcepublic abstract class GettextResourceextends java.util.ResourceBundleThis 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:
 
   
In the Sun approach, the keys are abstract textual shortcuts.
       In the GNU gettext approach, the keys are the English/ASCII version
       of the messages.
   
In the Sun approach, the translation files are called
       "
Resource_locale.properties" and have non-ASCII
       characters encoded in the Java
       
\unnnn syntax. Very few editors
       can natively display international characters in this format. In the
       GNU gettext approach, the translation files are called
       "
Resource.locale.po"
       and are in the encoding the translator has chosen. Many editors
       can be used. There are at least three GUI translating tools
       (Emacs PO mode, KDE KBabel, GNOME gtranslator).
   
In the Sun approach, the function
       
ResourceBundle.getString throws a
       
MissingResourceException when no translation is found.
       In the GNU gettext approach, the 
gettext function
       returns the (English) message key in that case.
   
In the Sun approach, there is no support for plural handling.
       Even the most elaborate MessageFormat strings cannot provide decent
       plural handling. In the GNU gettext approach, we have the
       
ngettext function.
 
 
 To compile GNU gettext message catalogs into Java ResourceBundle classes,
 the 
msgfmt program can be used.
Field Summary static boolean ../../gnu/gettext/GettextResource.html#verboseverbose            
 
Fields inherited from class java.util.ResourceBundle parent  
Constructor Summary ../../gnu/gettext/GettextResource.html#GettextResource()GettextResource ()           
 
Method Summary static java.lang.String ../../gnu/gettext/GettextResource.html#gettext(java.util.ResourceBundle, java.lang.String)gettext (java.util.ResourceBundle catalog,
        java.lang.String msgid)
          Returns the translation of 
msgid. static java.lang.String ../../gnu/gettext/GettextResource.html#ngettext(java.util.ResourceBundle, java.lang.String, java.lang.String, long)ngettext (java.util.ResourceBundle catalog,
         java.lang.String msgid,
         java.lang.String msgid_plural,
         long n)
          Returns the plural form for 
n of the translation of
 
msgid.  
Methods inherited from class java.util.ResourceBundle getBundle, getBundle, getBundle, getKeys, getLocale, getObject, getString, getStringArray, handleGetObject, setParent  
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait  
Field Detail verbose
public static boolean 
verbose Constructor Detail GettextResource
public 
GettextResource() Method Detail gettext
public static java.lang.String 
gettext(java.util.ResourceBundle catalog,
                                       java.lang.String msgid)
Returns the translation of msgid.Parameters:catalog - a ResourceBundlemsgid - the key string to be translated, an ASCII stringReturns:the translation of msgid, or msgid if
         none is found
ngettext
public static java.lang.String 
ngettext(java.util.ResourceBundle catalog,
                                        java.lang.String msgid,
                                        java.lang.String msgid_plural,
                                        long n)
Returns the plural form for n of the translation of
 
msgid.Parameters:catalog - a ResourceBundlemsgid - the key string to be translated, an ASCII stringmsgid_plural - its English plural formReturns:the translation of msgid depending on n,
         or 
msgid or msgid_plural if none is found   
  
  Class   
    ../../overview-tree.htmlTree    
    ../../deprecated-list.htmlDeprecated    
    ../../index-all.htmlIndex    
    ../../help-doc.htmlHelp    
 PREV CLASS 
 NEXT CLASS
  
../../index.htmlFRAMES    
 
GettextResource.htmlNO FRAMES   SUMMARY:  INNER | 
#field_summaryFIELD  | #constructor_summaryCONSTR  | #method_summaryMETHOD DETAIL:  
#field_detailFIELD  | #constructor_detailCONSTR  | #method_detailMETHOD 