Logo Search packages:      
Sourcecode: icu version File versions

StringEnumeration *U_EXPORT2 Collator::getAvailableLocales ( void   ) [static, inherited]

Return a StringEnumeration over the locales available at the time of the call, including registered locales. If a severe error occurs (such as out of memory condition) this will return null. If there is no locale data, an empty enumeration will be returned.

Returns:
a StringEnumeration over the locales available at the time of the call ICU 2.6

Definition at line 774 of file coll.cpp.

References ICULocaleService::getAvailableLocales(), NULL, and U_ZERO_ERROR.

Referenced by CollationServiceTest::checkAvailable(), CollationAPITest::TestGetAll(), ucol_countAvailable(), ucol_getAvailable(), and ucol_openAvailableLocales().

{
#if !UCONFIG_NO_SERVICE
    if (hasService()) {
        return getService()->getAvailableLocales();
    }
#endif /* UCONFIG_NO_SERVICE */
    UErrorCode status = U_ZERO_ERROR;
    if (isAvailableLocaleListInitialized(status)) {
        return new CollationLocaleListEnumeration();
    }
    return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index