]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/unicode/locid.h
2 ******************************************************************************
4 * Copyright (C) 1996-2013, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 ******************************************************************************
11 * Created by: Helena Shih
13 * Modification History:
15 * Date Name Description
16 * 02/11/97 aliu Changed gLocPath to fgLocPath and added methods to
18 * 04/02/97 aliu Made operator!= inline; fixed return value of getName().
19 * 04/15/97 aliu Cleanup for AIX/Win32.
20 * 04/24/97 aliu Numerous changes per code review.
21 * 08/18/98 stephen Added tokenizeString(),changed getDisplayName()
22 * 09/08/98 stephen Moved definition of kEmptyString for Mac Port
23 * 11/09/99 weiv Added const char * getName() const;
24 * 04/12/00 srl removing unicodestring api's and cached hash code
25 * 08/10/01 grhoten Change the static Locales to accessor functions
26 ******************************************************************************
32 #include "unicode/utypes.h"
33 #include "unicode/uobject.h"
34 #include "unicode/unistr.h"
35 #include "unicode/putil.h"
36 #include "unicode/uloc.h"
37 #include "unicode/strenum.h"
41 * \brief C++ API: Locale ID object.
47 * A <code>Locale</code> object represents a specific geographical, political,
48 * or cultural region. An operation that requires a <code>Locale</code> to perform
49 * its task is called <em>locale-sensitive</em> and uses the <code>Locale</code>
50 * to tailor information for the user. For example, displaying a number
51 * is a locale-sensitive operation--the number should be formatted
52 * according to the customs/conventions of the user's native country,
55 * The Locale class is not suitable for subclassing.
58 * You can create a <code>Locale</code> object using the constructor in
60 * \htmlonly<blockquote>\endhtmlonly
62 * Locale( const char* language,
63 * const char* country,
64 * const char* variant);
66 * \htmlonly</blockquote>\endhtmlonly
67 * The first argument to the constructors is a valid <STRONG>ISO
68 * Language Code.</STRONG> These codes are the lower-case two-letter
69 * codes as defined by ISO-639.
70 * You can find a full list of these codes at:
71 * <BR><a href ="http://www.loc.gov/standards/iso639-2/">
72 * http://www.loc.gov/standards/iso639-2/</a>
75 * The second argument to the constructors is a valid <STRONG>ISO Country
76 * Code.</STRONG> These codes are the upper-case two-letter codes
77 * as defined by ISO-3166.
78 * You can find a full list of these codes at a number of sites, such as:
79 * <BR><a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
80 * http://www.iso.org/iso/en/prods-services/iso3166ma/index.html</a>
83 * The third constructor requires a third argument--the <STRONG>Variant.</STRONG>
84 * The Variant codes are vendor and browser-specific.
85 * For example, use REVISED for a langauge's revised script orthography, and POSIX for POSIX.
86 * Where there are two variants, separate them with an underscore, and
87 * put the most important one first. For
88 * example, a Traditional Spanish collation might be referenced, with
89 * "ES", "ES", "Traditional_POSIX".
92 * Because a <code>Locale</code> object is just an identifier for a region,
93 * no validity check is performed when you construct a <code>Locale</code>.
94 * If you want to see whether particular resources are available for the
95 * <code>Locale</code> you construct, you must query those resources. For
96 * example, ask the <code>NumberFormat</code> for the locales it supports
97 * using its <code>getAvailableLocales</code> method.
98 * <BR><STRONG>Note:</STRONG> When you ask for a resource for a particular
99 * locale, you get back the best available match, not necessarily
100 * precisely what you asked for. For more information, look at
101 * <code>ResourceBundle</code>.
104 * The <code>Locale</code> class provides a number of convenient constants
105 * that you can use to create <code>Locale</code> objects for commonly used
106 * locales. For example, the following refers to a <code>Locale</code> object
107 * for the United States:
108 * \htmlonly<blockquote>\endhtmlonly
112 * \htmlonly</blockquote>\endhtmlonly
115 * Once you've created a <code>Locale</code> you can query it for information about
116 * itself. Use <code>getCountry</code> to get the ISO Country Code and
117 * <code>getLanguage</code> to get the ISO Language Code. You can
118 * use <code>getDisplayCountry</code> to get the
119 * name of the country suitable for displaying to the user. Similarly,
120 * you can use <code>getDisplayLanguage</code> to get the name of
121 * the language suitable for displaying to the user. Interestingly,
122 * the <code>getDisplayXXX</code> methods are themselves locale-sensitive
123 * and have two versions: one that uses the default locale and one
124 * that takes a locale as an argument and displays the name or country in
125 * a language appropriate to that locale.
128 * ICU provides a number of classes that perform locale-sensitive
129 * operations. For example, the <code>NumberFormat</code> class formats
130 * numbers, currency, or percentages in a locale-sensitive manner. Classes
131 * such as <code>NumberFormat</code> have a number of convenience methods
132 * for creating a default object of that type. For example, the
133 * <code>NumberFormat</code> class provides these three convenience methods
134 * for creating a default <code>NumberFormat</code> object:
135 * \htmlonly<blockquote>\endhtmlonly
137 * UErrorCode success = U_ZERO_ERROR;
141 * nf = NumberFormat::createInstance( success ); delete nf;
142 * nf = NumberFormat::createCurrencyInstance( success ); delete nf;
143 * nf = NumberFormat::createPercentInstance( success ); delete nf;
145 * \htmlonly</blockquote>\endhtmlonly
146 * Each of these methods has two variants; one with an explicit locale
147 * and one without; the latter using the default locale.
148 * \htmlonly<blockquote>\endhtmlonly
150 * nf = NumberFormat::createInstance( myLocale, success ); delete nf;
151 * nf = NumberFormat::createCurrencyInstance( myLocale, success ); delete nf;
152 * nf = NumberFormat::createPercentInstance( myLocale, success ); delete nf;
154 * \htmlonly</blockquote>\endhtmlonly
155 * A <code>Locale</code> is the mechanism for identifying the kind of object
156 * (<code>NumberFormat</code>) that you would like to get. The locale is
157 * <STRONG>just</STRONG> a mechanism for identifying objects,
158 * <STRONG>not</STRONG> a container for the objects themselves.
161 * Each class that performs locale-sensitive operations allows you
162 * to get all the available objects of that type. You can sift
163 * through these objects by language, country, or variant,
164 * and use the display names to present a menu to the user.
165 * For example, you can create a menu of all the collation objects
166 * suitable for a given language. Such classes implement these
167 * three class methods:
168 * \htmlonly<blockquote>\endhtmlonly
170 * static Locale* getAvailableLocales(int32_t& numLocales)
171 * static UnicodeString& getDisplayName(const Locale& objectLocale,
172 * const Locale& displayLocale,
173 * UnicodeString& displayName)
174 * static UnicodeString& getDisplayName(const Locale& objectLocale,
175 * UnicodeString& displayName)
177 * \htmlonly</blockquote>\endhtmlonly
180 * @see ResourceBundle
182 class U_COMMON_API Locale
: public UObject
{
184 /** Useful constant for the Root locale. @stable ICU 4.4 */
185 static const Locale
&U_EXPORT2
getRoot(void);
186 /** Useful constant for this language. @stable ICU 2.0 */
187 static const Locale
&U_EXPORT2
getEnglish(void);
188 /** Useful constant for this language. @stable ICU 2.0 */
189 static const Locale
&U_EXPORT2
getFrench(void);
190 /** Useful constant for this language. @stable ICU 2.0 */
191 static const Locale
&U_EXPORT2
getGerman(void);
192 /** Useful constant for this language. @stable ICU 2.0 */
193 static const Locale
&U_EXPORT2
getItalian(void);
194 /** Useful constant for this language. @stable ICU 2.0 */
195 static const Locale
&U_EXPORT2
getJapanese(void);
196 /** Useful constant for this language. @stable ICU 2.0 */
197 static const Locale
&U_EXPORT2
getKorean(void);
198 /** Useful constant for this language. @stable ICU 2.0 */
199 static const Locale
&U_EXPORT2
getChinese(void);
200 /** Useful constant for this language. @stable ICU 2.0 */
201 static const Locale
&U_EXPORT2
getSimplifiedChinese(void);
202 /** Useful constant for this language. @stable ICU 2.0 */
203 static const Locale
&U_EXPORT2
getTraditionalChinese(void);
205 /** Useful constant for this country/region. @stable ICU 2.0 */
206 static const Locale
&U_EXPORT2
getFrance(void);
207 /** Useful constant for this country/region. @stable ICU 2.0 */
208 static const Locale
&U_EXPORT2
getGermany(void);
209 /** Useful constant for this country/region. @stable ICU 2.0 */
210 static const Locale
&U_EXPORT2
getItaly(void);
211 /** Useful constant for this country/region. @stable ICU 2.0 */
212 static const Locale
&U_EXPORT2
getJapan(void);
213 /** Useful constant for this country/region. @stable ICU 2.0 */
214 static const Locale
&U_EXPORT2
getKorea(void);
215 /** Useful constant for this country/region. @stable ICU 2.0 */
216 static const Locale
&U_EXPORT2
getChina(void);
217 /** Useful constant for this country/region. @stable ICU 2.0 */
218 static const Locale
&U_EXPORT2
getPRC(void);
219 /** Useful constant for this country/region. @stable ICU 2.0 */
220 static const Locale
&U_EXPORT2
getTaiwan(void);
221 /** Useful constant for this country/region. @stable ICU 2.0 */
222 static const Locale
&U_EXPORT2
getUK(void);
223 /** Useful constant for this country/region. @stable ICU 2.0 */
224 static const Locale
&U_EXPORT2
getUS(void);
225 /** Useful constant for this country/region. @stable ICU 2.0 */
226 static const Locale
&U_EXPORT2
getCanada(void);
227 /** Useful constant for this country/region. @stable ICU 2.0 */
228 static const Locale
&U_EXPORT2
getCanadaFrench(void);
232 * Construct a default locale object, a Locale for the default locale ID.
235 * @see uloc_getDefault
241 * Construct a locale from language, country, variant.
242 * If an error occurs, then the constructed object will be "bogus"
243 * (isBogus() will return TRUE).
245 * @param language Lowercase two-letter or three-letter ISO-639 code.
246 * This parameter can instead be an ICU style C locale (e.g. "en_US"),
247 * but the other parameters must not be used.
248 * This parameter can be NULL; if so,
249 * the locale is initialized to match the current default locale.
250 * (This is the same as using the default constructor.)
251 * Please note: The Java Locale class does NOT accept the form
252 * 'new Locale("en_US")' but only 'new Locale("en","US")'
254 * @param country Uppercase two-letter ISO-3166 code. (optional)
255 * @param variant Uppercase vendor and browser specific code. See class
256 * description. (optional)
257 * @param keywordsAndValues A string consisting of keyword/values pairs, such as
258 * "collation=phonebook;currency=euro"
261 * @see uloc_getDefault
264 Locale( const char * language
,
265 const char * country
= 0,
266 const char * variant
= 0,
267 const char * keywordsAndValues
= 0);
270 * Initializes a Locale object from another Locale object.
272 * @param other The Locale object being copied in.
275 Locale(const Locale
& other
);
285 * Replaces the entire contents of *this with the specified value.
287 * @param other The Locale object being copied in.
291 Locale
& operator=(const Locale
& other
);
294 * Checks if two locale keys are the same.
296 * @param other The locale key object to be compared with this.
297 * @return True if the two locale keys are the same, false otherwise.
300 UBool
operator==(const Locale
& other
) const;
303 * Checks if two locale keys are not the same.
305 * @param other The locale key object to be compared with this.
306 * @return True if the two locale keys are not the same, false
310 UBool
operator!=(const Locale
& other
) const;
314 * Clones can be used concurrently in multiple threads.
315 * If an error occurs, then NULL is returned.
316 * The caller must delete the clone.
318 * @return a clone of this object
320 * @see getDynamicClassID
323 Locale
*clone() const;
325 #ifndef U_HIDE_SYSTEM_API
327 * Common methods of getting the current default Locale. Used for the
328 * presentation: menus, dialogs, etc. Generally set once when your applet or
329 * application is initialized, then never reset. (If you do reset the
330 * default locale, you probably want to reload your GUI, so that the change
331 * is reflected in your interface.)
333 * More advanced programs will allow users to use different locales for
334 * different fields, e.g. in a spreadsheet.
336 * Note that the initial setting will match the host system.
337 * @return a reference to the Locale object for the default locale ID
341 static const Locale
& U_EXPORT2
getDefault(void);
344 * Sets the default. Normally set once at the beginning of a process,
346 * setDefault() only changes ICU's default locale ID, <strong>not</strong>
347 * the default locale ID of the runtime environment.
349 * @param newLocale Locale to set to. If NULL, set to the value obtained
350 * from the runtime environement.
351 * @param success The error code.
355 static void U_EXPORT2
setDefault(const Locale
& newLocale
,
356 UErrorCode
& success
);
357 #endif /* U_HIDE_SYSTEM_API */
360 * Creates a locale which has had minimal canonicalization
361 * as per uloc_getName().
362 * @param name The name to create from. If name is null,
363 * the default Locale is used.
364 * @return new locale object
368 static Locale U_EXPORT2
createFromName(const char *name
);
371 * Creates a locale from the given string after canonicalizing
372 * the string by calling uloc_canonicalize().
373 * @param name the locale ID to create from. Must not be NULL.
374 * @return a new locale object corresponding to the given name
376 * @see uloc_canonicalize
378 static Locale U_EXPORT2
createCanonical(const char* name
);
381 * Returns the locale's ISO-639 language code.
382 * @return An alias to the code
385 inline const char * getLanguage( ) const;
388 * Returns the locale's ISO-15924 abbreviation script code.
389 * @return An alias to the code
390 * @see uscript_getShortName
391 * @see uscript_getCode
394 inline const char * getScript( ) const;
397 * Returns the locale's ISO-3166 country code.
398 * @return An alias to the code
401 inline const char * getCountry( ) const;
404 * Returns the locale's variant code.
405 * @return An alias to the code
408 inline const char * getVariant( ) const;
411 * Returns the programmatic name of the entire locale, with the language,
412 * country and variant separated by underbars. If a field is missing, up
413 * to two leading underbars will occur. Example: "en", "de_DE", "en_US_WIN",
414 * "de__POSIX", "fr__MAC", "__MAC", "_MT", "_FR_EURO"
415 * @return A pointer to "name".
418 inline const char * getName() const;
421 * Returns the programmatic name of the entire locale as getName would return,
422 * but without keywords.
423 * @return A pointer to "name".
427 const char * getBaseName() const;
431 * Gets the list of keywords for the specified locale.
433 * @param status the status code
434 * @return pointer to StringEnumeration class, or NULL if there are no keywords.
435 * Client must dispose of it by calling delete.
438 StringEnumeration
* createKeywords(UErrorCode
&status
) const;
441 * Gets the value for a keyword.
443 * @param keywordName name of the keyword for which we want the value. Case insensitive.
444 * @param buffer The buffer to receive the keyword value.
445 * @param bufferCapacity The capacity of receiving buffer
446 * @param status Returns any error information while performing this operation.
447 * @return the length of the keyword value
451 int32_t getKeywordValue(const char* keywordName
, char *buffer
, int32_t bufferCapacity
, UErrorCode
&status
) const;
454 * Sets the value for a keyword.
456 * @param keywordName name of the keyword to be set. Case insensitive.
457 * @param keywordValue value of the keyword to be set. If 0-length or
458 * NULL, will result in the keyword being removed. No error is given if
459 * that keyword does not exist.
460 * @param status Returns any error information while performing this operation.
464 void setKeywordValue(const char* keywordName
, const char* keywordValue
, UErrorCode
&status
);
467 * returns the locale's three-letter language code, as specified
468 * in ISO draft standard ISO-639-2.
469 * @return An alias to the code, or an empty string
472 const char * getISO3Language() const;
475 * Fills in "name" with the locale's three-letter ISO-3166 country code.
476 * @return An alias to the code, or an empty string
479 const char * getISO3Country() const;
482 * Returns the Windows LCID value corresponding to this locale.
483 * This value is stored in the resource data for the locale as a one-to-four-digit
484 * hexadecimal number. If the resource is missing, in the wrong format, or
485 * there is no Windows LCID value that corresponds to this locale, returns 0.
488 uint32_t getLCID(void) const;
491 * Fills in "dispLang" with the name of this locale's language in a format suitable for
492 * user display in the default locale. For example, if the locale's language code is
493 * "fr" and the default locale's language code is "en", this function would set
494 * dispLang to "French".
495 * @param dispLang Receives the language's display name.
496 * @return A reference to "dispLang".
499 UnicodeString
& getDisplayLanguage(UnicodeString
& dispLang
) const;
502 * Fills in "dispLang" with the name of this locale's language in a format suitable for
503 * user display in the locale specified by "displayLocale". For example, if the locale's
504 * language code is "en" and displayLocale's language code is "fr", this function would set
505 * dispLang to "Anglais".
506 * @param displayLocale Specifies the locale to be used to display the name. In other words,
507 * if the locale's language code is "en", passing Locale::getFrench() for
508 * displayLocale would result in "Anglais", while passing Locale::getGerman()
509 * for displayLocale would result in "Englisch".
510 * @param dispLang Receives the language's display name.
511 * @return A reference to "dispLang".
514 UnicodeString
& getDisplayLanguage( const Locale
& displayLocale
,
515 UnicodeString
& dispLang
) const;
518 * Fills in "dispScript" with the name of this locale's script in a format suitable
519 * for user display in the default locale. For example, if the locale's script code
520 * is "LATN" and the default locale's language code is "en", this function would set
521 * dispScript to "Latin".
522 * @param dispScript Receives the scripts's display name.
523 * @return A reference to "dispScript".
526 UnicodeString
& getDisplayScript( UnicodeString
& dispScript
) const;
529 * Fills in "dispScript" with the name of this locale's country in a format suitable
530 * for user display in the locale specified by "displayLocale". For example, if the locale's
531 * script code is "LATN" and displayLocale's language code is "en", this function would set
532 * dispScript to "Latin".
533 * @param displayLocale Specifies the locale to be used to display the name. In other
534 * words, if the locale's script code is "LATN", passing
535 * Locale::getFrench() for displayLocale would result in "", while
536 * passing Locale::getGerman() for displayLocale would result in
538 * @param dispScript Receives the scripts's display name.
539 * @return A reference to "dispScript".
542 UnicodeString
& getDisplayScript( const Locale
& displayLocale
,
543 UnicodeString
& dispScript
) const;
546 * Fills in "dispCountry" with the name of this locale's country in a format suitable
547 * for user display in the default locale. For example, if the locale's country code
548 * is "FR" and the default locale's language code is "en", this function would set
549 * dispCountry to "France".
550 * @param dispCountry Receives the country's display name.
551 * @return A reference to "dispCountry".
554 UnicodeString
& getDisplayCountry( UnicodeString
& dispCountry
) const;
557 * Fills in "dispCountry" with the name of this locale's country in a format suitable
558 * for user display in the locale specified by "displayLocale". For example, if the locale's
559 * country code is "US" and displayLocale's language code is "fr", this function would set
560 * dispCountry to "États-Unis".
561 * @param displayLocale Specifies the locale to be used to display the name. In other
562 * words, if the locale's country code is "US", passing
563 * Locale::getFrench() for displayLocale would result in "États-Unis", while
564 * passing Locale::getGerman() for displayLocale would result in
565 * "Vereinigte Staaten".
566 * @param dispCountry Receives the country's display name.
567 * @return A reference to "dispCountry".
570 UnicodeString
& getDisplayCountry( const Locale
& displayLocale
,
571 UnicodeString
& dispCountry
) const;
574 * Fills in "dispVar" with the name of this locale's variant code in a format suitable
575 * for user display in the default locale.
576 * @param dispVar Receives the variant's name.
577 * @return A reference to "dispVar".
580 UnicodeString
& getDisplayVariant( UnicodeString
& dispVar
) const;
583 * Fills in "dispVar" with the name of this locale's variant code in a format
584 * suitable for user display in the locale specified by "displayLocale".
585 * @param displayLocale Specifies the locale to be used to display the name.
586 * @param dispVar Receives the variant's display name.
587 * @return A reference to "dispVar".
590 UnicodeString
& getDisplayVariant( const Locale
& displayLocale
,
591 UnicodeString
& dispVar
) const;
594 * Fills in "name" with the name of this locale in a format suitable for user display
595 * in the default locale. This function uses getDisplayLanguage(), getDisplayCountry(),
596 * and getDisplayVariant() to do its work, and outputs the display name in the format
597 * "language (country[,variant])". For example, if the default locale is en_US, then
598 * fr_FR's display name would be "French (France)", and es_MX_Traditional's display name
599 * would be "Spanish (Mexico,Traditional)".
600 * @param name Receives the locale's display name.
601 * @return A reference to "name".
604 UnicodeString
& getDisplayName( UnicodeString
& name
) const;
607 * Fills in "name" with the name of this locale in a format suitable for user display
608 * in the locale specfied by "displayLocale". This function uses getDisplayLanguage(),
609 * getDisplayCountry(), and getDisplayVariant() to do its work, and outputs the display
610 * name in the format "language (country[,variant])". For example, if displayLocale is
611 * fr_FR, then en_US's display name would be "Anglais (États-Unis)", and no_NO_NY's
612 * display name would be "norvégien (Norvège,NY)".
613 * @param displayLocale Specifies the locale to be used to display the name.
614 * @param name Receives the locale's display name.
615 * @return A reference to "name".
618 UnicodeString
& getDisplayName( const Locale
& displayLocale
,
619 UnicodeString
& name
) const;
622 * Generates a hash code for the locale.
625 int32_t hashCode(void) const;
628 * Sets the locale to bogus
629 * A bogus locale represents a non-existing locale associated
630 * with services that can be instantiated from non-locale data
631 * in addition to locale (for example, collation can be
632 * instantiated from a locale and from a rule set).
638 * Gets the bogus state. Locale object can be bogus if it doesn't exist
639 * @return FALSE if it is a real locale, TRUE if it is a bogus locale
642 UBool
isBogus(void) const;
645 * Returns a list of all installed locales.
646 * @param count Receives the number of locales in the list.
647 * @return A pointer to an array of Locale objects. This array is the list
648 * of all locales with installed resource files. The called does NOT
649 * get ownership of this list, and must NOT delete it.
652 static const Locale
* U_EXPORT2
getAvailableLocales(int32_t& count
);
655 * Gets a list of all available 2-letter country codes defined in ISO 3166. This is a
656 * pointer to an array of pointers to arrays of char. All of these pointers are
657 * owned by ICU-- do not delete them, and do not write through them. The array is
658 * terminated with a null pointer.
659 * @return a list of all available country codes
662 static const char* const* U_EXPORT2
getISOCountries();
665 * Gets a list of all available language codes defined in ISO 639. This is a pointer
666 * to an array of pointers to arrays of char. All of these pointers are owned
667 * by ICU-- do not delete them, and do not write through them. The array is
668 * terminated with a null pointer.
669 * @return a list of all available language codes
672 static const char* const* U_EXPORT2
getISOLanguages();
675 * ICU "poor man's RTTI", returns a UClassID for this class.
679 static UClassID U_EXPORT2
getStaticClassID();
682 * ICU "poor man's RTTI", returns a UClassID for the actual class.
686 virtual UClassID
getDynamicClassID() const;
688 protected: /* only protected for testing purposes. DO NOT USE. */
689 #ifndef U_HIDE_INTERNAL_API
691 * Set this from a single POSIX style locale string.
694 void setFromPOSIXID(const char *posixID
);
695 #endif /* U_HIDE_INTERNAL_API */
699 * Initialize the locale object with a new name.
700 * Was deprecated - used in implementation - moved internal
702 * @param cLocaleID The new locale name.
703 * @param canonicalize whether to call uloc_canonicalize on cLocaleID
705 Locale
& init(const char* cLocaleID
, UBool canonicalize
);
708 * Internal constructor to allow construction of a locale object with
709 * NO side effects. (Default constructor tries to get
710 * the default locale.)
718 * Initialize the locale cache for commonly used locales
720 static Locale
*getLocaleCache(void);
722 char language
[ULOC_LANG_CAPACITY
];
723 char script
[ULOC_SCRIPT_CAPACITY
];
724 char country
[ULOC_COUNTRY_CAPACITY
];
725 int32_t variantBegin
;
727 char fullNameBuffer
[ULOC_FULLNAME_CAPACITY
];
728 // name without keywords
730 char baseNameBuffer
[ULOC_FULLNAME_CAPACITY
];
734 static const Locale
&getLocale(int locid
);
737 * A friend to allow the default locale to be set by either the C or C++ API.
740 friend Locale
*locale_set_default_internal(const char *, UErrorCode
& status
);
744 Locale::operator!=(const Locale
& other
) const
746 return !operator==(other
);
750 Locale::getCountry() const
756 Locale::getLanguage() const
762 Locale::getScript() const
768 Locale::getVariant() const
770 getBaseName(); // lazy init
771 return &baseName
[variantBegin
];
775 Locale::getName() const
781 Locale::isBogus(void) const {