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

U_STABLE const char* U_EXPORT2 ucal_getLocaleByType ( const UCalendar cal,
ULocDataLocaleType  type,
UErrorCode status 
)

Get the locale for this calendar object. You can choose between valid and actual locale.

Parameters:
calThe calendar object
typetype of the locale we're looking for (valid or actual)
statuserror code for the operation
Returns:
the locale name ICU 2.8

Definition at line 484 of file ucal.cpp.

References NULL, U_ILLEGAL_ARGUMENT_ERROR, and U_SUCCESS.

{
    if (cal == NULL) {
        if (U_SUCCESS(*status)) {
            *status = U_ILLEGAL_ARGUMENT_ERROR;
        }
        return NULL;
    }
    return ((Calendar*)cal)->getLocaleID(type, *status);
}

Generated by  Doxygen 1.6.0   Back to index