Logo Search packages:      
Sourcecode: icu version File versions  Download package

StringEnumeration *U_EXPORT2 Collator::getKeywordValuesForLocale ( const char *  keyword,
const Locale locale,
UBool  commonlyUsed,
UErrorCode status 
) [static, inherited]

Given a key and a locale, returns an array of string values in a preferred order that would make a difference. These are all and only those values where the open (creation) of the service with the locale formed from the input locale plus input keyword and that value has different behavior than creation with the input locale alone.

Parameters:
keyword one of the keys supported by this service. For now, only "collation" is supported.
locale the locale
commonlyUsed if set to true it will return only commonly used values with the given locale in preferred order. Otherwise, it will return all the available values for the locale.
status ICU status
Returns:
a string enumeration over keyword values for the given key and the locale. ICU 4.2

Definition at line 811 of file coll.cpp.

References Locale::getName(), NULL, and U_FAILURE.

Referenced by CollationAPITest::TestProperty().

                                                                            {
    // This is a wrapper over ucol_getKeywordValuesForLocale
    UEnumeration *uenum = ucol_getKeywordValuesForLocale(key, locale.getName(),
                                                        commonlyUsed, &status);
    if (U_FAILURE(status)) {
        uenum_close(uenum);
        return NULL;
    }
    return new UStringEnumeration(uenum);
}


Generated by  Doxygen 1.6.0   Back to index