home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / include / locid.h < prev    next >
C/C++ Source or Header  |  1999-11-12  |  25KB  |  564 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1996                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1996-1999               *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.                  *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure             *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                              *
  10. *                                                                                       *
  11. *****************************************************************************************
  12. *
  13. * File locid.h
  14. *
  15. * Created by: Helena Shih
  16. *
  17. * Modification History:
  18. *
  19. *   Date        Name        Description
  20. *   02/11/97    aliu        Changed gLocPath to fgLocPath and added methods to
  21. *                           get and set it.
  22. *   04/02/97    aliu        Made operator!= inline; fixed return value of getName().
  23. *   04/15/97    aliu        Cleanup for AIX/Win32.
  24. *   04/24/97    aliu        Numerous changes per code review.
  25. *    08/18/98    stephen        Added tokenizeString(),changed getDisplayName()
  26. *    09/08/98    stephen        Moved definition of kEmptyString for Mac Port
  27. *****************************************************************************************
  28. */
  29.  
  30. #ifndef LOCID_H
  31. #define LOCID_H
  32.  
  33.  
  34. #include "unistr.h"
  35.  
  36. /**    
  37.  *
  38.  * A <code>Locale</code> object represents a specific geographical, political,
  39.  * or cultural region. An operation that requires a <code>Locale</code> to perform
  40.  * its task is called <em>locale-sensitive</em> and uses the <code>Locale</code>
  41.  * to tailor information for the user. For example, displaying a number
  42.  * is a locale-sensitive operation--the number should be formatted
  43.  * according to the customs/conventions of the user's native country,
  44.  * region, or culture.
  45.  *
  46.  * <P>
  47.  * You create a <code>Locale</code> object using one of the three constructors in
  48.  * this class:
  49.  * <blockquote>
  50.  * <pre>
  51.  * .      Locale( const   UnicodeString&  newLanguage);
  52.  * .
  53.  * .      Locale( const   UnicodeString&  language, 
  54.  * .              const   UnicodeString&  country);
  55.  * .
  56.  * .      Locale( const   UnicodeString&  language, 
  57.  * .              const   UnicodeString&  country, 
  58.  * .              const   UnicodeString&  variant);
  59.  * </pre>
  60.  * </blockquote>
  61.  * The first argument to the constructors is a valid <STRONG>ISO
  62.  * Language Code.</STRONG> These codes are the lower-case two-letter
  63.  * codes as defined by ISO-639.
  64.  * You can find a full list of these codes at a number of sites, such as:
  65.  * <BR><a href ="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">
  66.  * <code>http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt</code></a>
  67.  *
  68.  * <P>
  69.  * The second argument to the constructors is a valid <STRONG>ISO Country
  70.  * Code.</STRONG> These codes are the upper-case two-letter codes
  71.  * as defined by ISO-3166.
  72.  * You can find a full list of these codes at a number of sites, such as:
  73.  * <BR><a href="http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html">
  74.  * <code>http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html</code></a>
  75.  *
  76.  * <P>
  77.  * The third constructor requires a third argument--the <STRONG>Variant.</STRONG>
  78.  * The Variant codes are vendor and browser-specific.
  79.  * For example, use WIN for Windows, MAC for Macintosh, and POSIX for POSIX.
  80.  * Where there are two variants, separate them with an underscore, and
  81.  * put the most important one first. For
  82.  * example, a Traditional Spanish collation might be referenced, with
  83.  * "ES", "ES", "Traditional_WIN".
  84.  *
  85.  * <P>
  86.  * Because a <code>Locale</code> object is just an identifier for a region,
  87.  * no validity check is performed when you construct a <code>Locale</code>.
  88.  * If you want to see whether particular resources are available for the
  89.  * <code>Locale</code> you construct, you must query those resources. For
  90.  * example, ask the <code>NumberFormat</code> for the locales it supports
  91.  * using its <code>getAvailableLocales</code> method.
  92.  * <BR><STRONG>Note:</STRONG> When you ask for a resource for a particular
  93.  * locale, you get back the best available match, not necessarily
  94.  * precisely what you asked for. For more information, look at
  95.  * <a href="java.util.ResourceBundle.html"><code>ResourceBundle</code></a>.
  96.  *
  97.  * <P>
  98.  * The <code>Locale</code> class provides a number of convenient constants
  99.  * that you can use to create <code>Locale</code> objects for commonly used
  100.  * locales. For example, the following refers to a <code>Locale</code> object
  101.  * for the United States:
  102.  * <blockquote>
  103.  * <pre>
  104.  * .      Locale::US
  105.  * </pre>
  106.  * </blockquote>
  107.  *
  108.  * <P>
  109.  * Once you've created a <code>Locale</code> you can query it for information about
  110.  * itself. Use <code>getCountry</code> to get the ISO Country Code and
  111.  * <code>getLanguage</code> to get the ISO Language Code. You can
  112.  * use <code>getDisplayCountry</code> to get the
  113.  * name of the country suitable for displaying to the user. Similarly,
  114.  * you can use <code>getDisplayLanguage</code> to get the name of
  115.  * the language suitable for displaying to the user. Interestingly,
  116.  * the <code>getDisplayXXX</code> methods are themselves locale-sensitive
  117.  * and have two versions: one that uses the default locale and one
  118.  * that takes a locale as an argument and displays the name or country in
  119.  * a language appropriate to that locale.
  120.  *
  121.  * <P>
  122.  * The TIFC provides a number of classes that perform locale-sensitive
  123.  * operations. For example, the <code>NumberFormat</code> class formats
  124.  * numbers, currency, or percentages in a locale-sensitive manner. Classes
  125.  * such as <code>NumberFormat</code> have a number of convenience methods
  126.  * for creating a default object of that type. For example, the
  127.  * <code>NumberFormat</code> class provides these three convenience methods
  128.  * for creating a default <code>NumberFormat</code> object:
  129.  * <blockquote>
  130.  * <pre>
  131.  * .    UErrorCode success = U_ZERO_ERROR;
  132.  * .    Locale myLocale;
  133.  * .    NumberFormat *nf;
  134.  * .
  135.  * .    nf = NumberFormat::createInstance( success );          delete nf;
  136.  * .    nf = NumberFormat::createCurrencyInstance( success );  delete nf;
  137.  * .    nf = NumberFormat::createPercentInstance( success );   delete nf;
  138.  * </pre>
  139.  * </blockquote>
  140.  * Each of these methods has two variants; one with an explicit locale
  141.  * and one without; the latter using the default locale.
  142.  * <blockquote>
  143.  * <pre>
  144.  * .    nf = NumberFormat::createInstance( myLocale, success );          delete nf;
  145.  * .    nf = NumberFormat::createCurrencyInstance( myLocale, success );  delete nf;
  146.  * .    nf = NumberFormat::createPercentInstance( myLocale, success );   delete nf;
  147.  * </pre>
  148.  * </blockquote>
  149.  * A <code>Locale</code> is the mechanism for identifying the kind of object
  150.  * (<code>NumberFormat</code>) that you would like to get. The locale is
  151.  * <STRONG>just</STRONG> a mechanism for identifying objects,
  152.  * <STRONG>not</STRONG> a container for the objects themselves.
  153.  *
  154.  * <P>
  155.  * Each class that performs locale-sensitive operations allows you
  156.  * to get all the available objects of that type. You can sift
  157.  * through these objects by language, country, or variant,
  158.  * and use the display names to present a menu to the user.
  159.  * For example, you can create a menu of all the collation objects
  160.  * suitable for a given language. Such classes implement these
  161.  * three class methods:
  162.  * <blockquote>
  163.  * <pre>
  164.  * .      static Locale* getAvailableLocales(int32_t& numLocales)
  165.  * .      static UnicodeString& getDisplayName(const Locale&  objectLocale,
  166.  * .                                           const Locale&  displayLocale,
  167.  * .                                           UnicodeString& displayName)
  168.  * .      static UnicodeString& getDisplayName(const Locale&  objectLocale,
  169.  * .                                           UnicodeString& displayName)
  170.  * </pre>
  171.  * </blockquote>
  172.  */
  173. typedef struct ULocale ULocale;
  174. typedef struct UHashtable UHashtable;
  175.  
  176. #define ULOC_LANG_CAPACITY 3
  177. #define ULOC_COUNTRY_CAPACITY 3
  178. #define ULOC_FULLNAME_CAPACITY 50
  179.  
  180. class U_COMMON_API Locale 
  181. {
  182. public:
  183.     /**
  184.      * Useful constants for language.
  185.      */
  186.     static const Locale ENGLISH;
  187.     static const Locale FRENCH;
  188.     static const Locale GERMAN;
  189.     static const Locale ITALIAN;
  190.     static const Locale JAPANESE;
  191.     static const Locale KOREAN;
  192.     static const Locale CHINESE;
  193.     static const Locale SIMPLIFIED_CHINESE;
  194.     static const Locale TRADITIONAL_CHINESE;
  195.  
  196.     /**
  197.      * Useful constants for country.
  198.      */
  199.     static const Locale FRANCE;
  200.     static const Locale GERMANY;
  201.     static const Locale ITALY;
  202.     static const Locale JAPAN;
  203.     static const Locale KOREA;
  204.     static const Locale CHINA;      // Alias for PRC
  205.     static const Locale PRC;        // Peoples Republic of China
  206.     static const Locale TAIWAN;     // Republic of China
  207.     static const Locale UK;
  208.     static const Locale US;
  209.     static const Locale CANADA;
  210.     static const Locale CANADA_FRENCH;
  211.  
  212.    /**
  213.     * Construct an empty locale. It's only used when a fill-in parameter is
  214.     * needed.
  215.     */
  216.                                 Locale(); 
  217.  
  218.     /**
  219.      * Construct a locale from language, country, variant.
  220.      *
  221.      * @param language Lowercase two-letter ISO-639 code.
  222.      * @param country  Uppercase two-letter ISO-3166 code. (optional)
  223.      * @param variant  Uppercase vendor and browser specific code. See class
  224.      *                 description. (optional)
  225.      */
  226.                                 Locale( const   UnicodeString&  language, 
  227.                                         const   UnicodeString&  country , 
  228.                                         const   UnicodeString&  variant );
  229.  
  230.                 Locale( const   UnicodeString&  language, 
  231.                                         const   UnicodeString&  country );
  232.                 
  233.                 Locale( const   UnicodeString&  language);
  234.  
  235.  
  236.  
  237.     /**
  238.      * Initializes a Locale object from another Locale object.
  239.      *
  240.      * @param other The Locale object being copied in.
  241.      */
  242.                                 Locale(const    Locale& other);
  243.  
  244.  
  245.     /**
  246.      * Destructor
  247.      */
  248.                                 ~Locale() ;
  249.                   
  250.     /**
  251.      * Replaces the entire contents of *this with the specified value.
  252.      *
  253.      * @param other The Locale object being copied in.
  254.      * @return      *this
  255.      */
  256.     Locale&                     operator=(const Locale& other);
  257.  
  258.     /**
  259.      * Checks if two locale keys are the same.
  260.      *
  261.      * @param other The locale key object to be compared with this.
  262.      * @return      True if the two locale keys are the same, false otherwise.
  263.      */
  264.                 bool_t          operator==(const    Locale&     other) const;   
  265.  
  266.     /**
  267.      * Checks if two locale keys are not the same.
  268.      *
  269.      * @param other The locale key object to be compared with this.
  270.      * @return      True if the two locale keys are not the same, false
  271.      *              otherwise.
  272.      */
  273.                 bool_t          operator!=(const    Locale&     other) const;
  274.  
  275.     /**
  276.      * Common methods of getting the current default Locale. Used for the
  277.      * presentation: menus, dialogs, etc. Generally set once when your applet or
  278.      * application is initialized, then never reset. (If you do reset the
  279.      * default locale, you probably want to reload your GUI, so that the change
  280.      * is reflected in your interface.)
  281.      *
  282.      * More advanced programs will allow users to use different locales for
  283.      * different fields, e.g. in a spreadsheet.
  284.      *
  285.      * Note that the initial setting will match the host system.
  286.      */
  287.     static  Locale&             getDefault(void);
  288.  
  289.     /**
  290.      * Sets the default. Normally set once at the beginning of applet or
  291.      * application, then never reset. setDefault does NOT reset the host locale.
  292.      *
  293.      * @param newLocale Locale to set to.
  294.      */
  295.     static      void            setDefault(const    Locale&     newLocale,
  296.                                                     UErrorCode&  success);
  297.  
  298.     /**
  299.      * Fills in "lang" with the locale's two-letter ISO-639 language code.
  300.      * @param lang  Receives the language code.
  301.      * @return      A reference to "lang".
  302.      */
  303.                 UnicodeString&  getLanguage(        UnicodeString&  lang) const;
  304.     /**
  305.      * Fills in "cntry" with the locale's two-letter ISO-3166 country code.
  306.      * @param cntry Receives the country code.
  307.      * @return      A reference to "cntry".
  308.      */
  309.                 UnicodeString&  getCountry(         UnicodeString&  cntry) const;
  310.     /**
  311.      * Fills in "var" with the locale's variant code.
  312.      * @param var   Receives the variant code.
  313.      * @return      A reference to "var".
  314.      */
  315.                 UnicodeString&  getVariant(         UnicodeString&  var) const;
  316.  
  317.     /**
  318.      * Fills in "name" the programmatic name of the entire locale, with the language,
  319.      * country and variant separated by underbars. If a field is missing, at
  320.      * most one underbar will occur. Example: "en", "de_DE", "en_US_WIN",
  321.      * "de_POSIX", "fr_MAC"
  322.      * @param var   Receives the programmatic locale name.
  323.      * @return      A reference to "name".
  324.      */
  325.                 UnicodeString&  getName(        UnicodeString&  name) const;
  326.  
  327.     /**
  328.      * Fills in "name" with the locale's three-letter language code, as specified
  329.      * in ISO draft standard ISO-639-2..
  330.      * @param name  Receives the three-letter language code.
  331.      * @param status An UErrorCode to receive any MISSING_RESOURCE_ERRORs
  332.      * @return      A reference to "name".
  333.      */
  334.                 UnicodeString&  getISO3Language(UnicodeString&  name, UErrorCode& status) const;
  335.  
  336.     // this version is deprecated, use getISO3Language(UnicodeString&, UErrorCode&)
  337.                 UnicodeString&  getISO3Language(UnicodeString&  name) const;
  338.  
  339.     /**
  340.      * Fills in "name" with the locale's three-letter ISO-3166 country code.
  341.      * @param name  Receives the three-letter country code.
  342.      * @param status An UErrorCode to receive any MISSING_RESOURCE_ERRORs
  343.      * @return      A reference to "name".
  344.      */
  345.                 UnicodeString&  getISO3Country( UnicodeString&  name, UErrorCode& status) const;
  346.  
  347.     // this version is deprecated, use getISO3Country(UnicodeString&, UErrorCode&);
  348.                 UnicodeString&  getISO3Country( UnicodeString&  name) const;
  349.  
  350.     /**
  351.      * Returns the Windows LCID value corresponding to this locale.
  352.      * This value is stored in the resource data for the locale as a one-to-four-digit
  353.      * hexadecimal number.  If the resource is missing, in the wrong format, or
  354.      * there is no Windows LCID value that corresponds to this locale, returns 0.
  355.      */
  356.                 uint32_t        getLCID(void) const;
  357.  
  358.     /**
  359.      * Fills in "dispLang" with the name of this locale's language in a format suitable for
  360.      * user display in the default locale.  For example, if the locale's language code is
  361.      * "fr" and the default locale's language code is "en", this function would set
  362.      * dispLang to "French".
  363.      * @param dispLang  Receives the language's display name.
  364.      * @return          A reference to "dispLang".
  365.      */
  366.                 UnicodeString&  getDisplayLanguage(UnicodeString&   dispLang) const;
  367.  
  368.     /**
  369.      * Fills in "dispLang" with the name of this locale's language in a format suitable for
  370.      * user display in the locale specified by "inLocale".  For example, if the locale's
  371.      * language code is "en" and inLocale's language code is "fr", this function would set
  372.      * dispLang to "Anglais".
  373.      * @param inLocale  Specifies the locale to be used to display the name.  In other words,
  374.      *                  if the locale's language code is "en", passing Locale::FRENCH for
  375.      *                  inLocale would result in "Anglais", while passing Locale::GERMAN
  376.      *                  for inLocale would result in "Englisch".
  377.      * @param dispLang  Receives the language's display name.
  378.      * @return          A reference to "dispLang".
  379.      */
  380.                 UnicodeString&  getDisplayLanguage( const   Locale&         inLocale,
  381.                                                             UnicodeString&  dispLang) const;
  382.     /**
  383.      * Fills in "dispCountry" with the name of this locale's country in a format suitable
  384.      * for user display in the default locale.  For example, if the locale's country code
  385.      * is "FR" and the default locale's language code is "en", this function would set
  386.      * dispCountry to "France".
  387.      * @param dispCountry   Receives the country's display name.
  388.      * @return              A reference to "dispCountry".
  389.      */
  390.                 UnicodeString&  getDisplayCountry(          UnicodeString& dispCountry) const;
  391.     /**
  392.      * Fills in "dispCountry" with the name of this locale's country in a format suitable
  393.      * for user display in the locale specified by "inLocale".  For example, if the locale's
  394.      * country code is "US" and inLocale's language code is "fr", this function would set
  395.      * dispCountry to "Etats-Unis".
  396.      * @param inLocale      Specifies the locale to be used to display the name.  In other
  397.      *                      words, if the locale's country code is "US", passing
  398.      *                      Locale::FRENCH for inLocale would result in "États-Unis", while
  399.      *                      passing Locale::GERMAN for inLocale would result in
  400.      *                      "Vereinigte Staaten".
  401.      * @param dispCountry   Receives the country's display name.
  402.      * @return              A reference to "dispCountry".
  403.      */
  404.                 UnicodeString&  getDisplayCountry(  const   Locale&         inLocale,
  405.                                                             UnicodeString&  dispCountry) const;
  406.  
  407.     /**
  408.      * Fills in "dispVar" with the name of this locale's variant code in a format suitable
  409.      * for user display in the default locale.
  410.      * @param dispVar   Receives the variant's name.
  411.      * @return          A reference to "dispVar".
  412.      */
  413.                 UnicodeString&  getDisplayVariant(      UnicodeString& dispVar) const;
  414.     /**
  415.      * Fills in "dispVar" with the name of this locale's variant code in a format
  416.      * suitable for user display in the locale specified by "inLocale".
  417.      * @param inLocale  Specifies the locale to be used to display the name.
  418.      * @param dispVar   Receives the variant's display name.
  419.      * @return          A reference to "dispVar".
  420.      */
  421.                 UnicodeString&  getDisplayVariant(  const   Locale&         inLocale,
  422.                                                             UnicodeString&  dispVar) const;
  423.     /**
  424.      * Fills in "name" with the name of this locale in a format suitable for user display 
  425.      * in the default locale.  This function uses getDisplayLanguage(), getDisplayCountry(),
  426.      * and getDisplayVariant() to do its work, and outputs the display name in the format
  427.      * "language (country[,variant])".  For example, if the default locale is en_US, then
  428.      * fr_FR's display name would be "French (France)", and es_MX_Traditional's display name
  429.      * would be "Spanish (Mexico,Traditional)".
  430.      * @param name  Receives the locale's display name.
  431.      * @return      A reference to "name".
  432.      */
  433.                 UnicodeString&  getDisplayName(         UnicodeString&  name) const;
  434.     /**
  435.      * Fills in "name" with the name of this locale in a format suitable for user display 
  436.      * in the locale specfied by "inLocale".  This function uses getDisplayLanguage(),
  437.      * getDisplayCountry(), and getDisplayVariant() to do its work, and outputs the display
  438.      * name in the format "language (country[,variant])".  For example, if inLocale is
  439.      * fr_FR, then en_US's display name would be "Anglais (États-Unis)", and no_NO_NY's
  440.      * display name would be "norvégien (Norvège,NY)".
  441.      * @param inLocale  Specifies the locale to be used to display the name.
  442.      * @param name      Receives the locale's display name.
  443.      * @return          A reference to "name".
  444.      */
  445.                 UnicodeString&  getDisplayName( const   Locale&         inLocale,
  446.                                                         UnicodeString&  name) const;
  447.     /**
  448.      * Generates a hash code for the locale. Since Locales are often used in hashtables, 
  449.      * caches the value for speed.
  450.      */
  451.                 int32_t         hashCode(void) const;
  452.  
  453.     /**
  454.      * Returns a list of all installed locales.
  455.      * @param count Receives the number of locales in the list.
  456.      * @return      A pointer to an array of Locale objects.  This array is the list
  457.      *              of all locales with installed resource files.  The called does NOT
  458.      *              get ownership of this list, and must NOT delete it.
  459.      */
  460.     static  const   Locale*     getAvailableLocales(int32_t& count);
  461.  
  462.     /**
  463.      * Returns a list of all 2-letter country codes defined in ISO 3166.
  464.      * Can be used to create Locales.
  465.      * @param count Receives the number of countries in the list.
  466.      * @return A pointer to an array of UnicodeString objects. The caller does NOT
  467.      *  get ownership of this list, and must NOT delete it.
  468.      */
  469.     static const UnicodeString* getISOCountries(int32_t& count);
  470.  
  471.     /**
  472.      * Returns a list of all 2-letter language codes defined in ISO 639.
  473.      * Can be used to create Locales.
  474.      * [NOTE:  ISO 639 is not a stable standard-- some languages' codes have changed.
  475.      * The list this function returns includes both the new and the old codes for the
  476.      * languages whose codes have changed.]
  477.      * @param count Receives the number of languages in the list.
  478.      * @return A pointer to an array of UnicodeString objects. The caller does NOT
  479.      *  get ownership of this list, and must NOT delete it.
  480.      */
  481.     static const UnicodeString* getISOLanguages(int32_t& count);
  482.     
  483.     /**
  484.      * Get the path to the ResourceBundle locale files. This path will be a
  485.      * platform-specific path name ending in a directory separator, so that file
  486.      * names may be concatenated to it. This path may be changed by calling
  487.      * setDataDirectory(). If setDataDirectory() has not been called yet,
  488.      * getDataDirectory() will return a platform-dependent default path as
  489.      * specified by TPlatformUtilities::getDefaultDataDirectory().
  490.      *
  491.      * @return Current data path.
  492.      */
  493.     static  const   char*       getDataDirectory(void);
  494.  
  495.     /**
  496.      * Set the path to the ResourceBundle locale files. After making this call,
  497.      * all objects in the Unicode Analytics package will read ResourceBundle
  498.      * data files in the specified directory in order to obtain locale data.
  499.      *
  500.      * @param path The new data path to be set to.
  501.      */
  502.     static  void                setDataDirectory(const char* path);
  503.     Locale& init(const char* cLocaleID);
  504.     
  505. protected: // only protected for testing purposes. DO NOT USE.
  506.     void setFromPOSIXID(const UnicodeString& posixID); // set it from a single string.
  507.     void setFromPOSIXID(const char *posixID); // set it from a single string.
  508.  
  509.     /**
  510.      * Given an ISO country code, returns an array of Strings containing the ISO
  511.      * codes of the languages spoken in that country.  Official languages are listed
  512.      * in the returned table before unofficial languages, but other than that, the
  513.      * order of the returned list is indeterminate.  If the value the user passes in
  514.      * for "country" is not a valid ISO 316 country code, or if we don't have language
  515.      * information for the specified country, this function returns an empty array.
  516.      *
  517.      * [This function is not currently part of Locale's API, but is needed in the
  518.      * implementation.  We hope to add it to the API in a future release.]
  519.      * @param country The ISO 2-letter country code of the desired country
  520.      * @param count Receives the number of languages in the list.
  521.      * @return A pointer to an array of UnicodeString objects. The caller does NOT
  522.      *  get ownership of this list, and must NOT delete it.
  523.      */
  524.     static const UnicodeString* getLanguagesForCountry(    const UnicodeString& country, 
  525.                                                         int32_t& count);
  526.  
  527.  
  528. private:
  529.     
  530.     /**
  531.      * Initializes a Locale object from a ULocale struct, which is the C locale object,
  532.      * and where the actual implementation is.
  533.      */
  534.     
  535.     void setHashCode(void);
  536.     char language[ULOC_LANG_CAPACITY];
  537.     char country[ULOC_COUNTRY_CAPACITY];
  538.     char* variant;
  539.     char* fullName;
  540.     char fullNameBuffer[ULOC_FULLNAME_CAPACITY];
  541.     int32_t khashCode;
  542.     
  543.     static Locale *localeList;
  544.     static int32_t localeListCount;
  545.     static UnicodeString *isoLanguages;
  546.     static int32_t isoLanguagesCount;
  547.     static UnicodeString *isoCountries;
  548.     static int32_t isoCountriesCount;
  549.     static UHashtable *ctry2LangMapping;
  550.     static const UnicodeString compressedCtry2LangMapping;
  551.  
  552.     static Locale fgDefaultLocale;
  553. };
  554.  
  555. inline bool_t
  556. Locale::operator!=(const    Locale&     other) const
  557. {
  558.     return !operator==(other);
  559. }
  560.  
  561. #endif
  562.  
  563.  
  564.