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

U_STABLE uint32_t U_EXPORT2 uloc_getLCID ( const char *  localeID  ) 

Gets the Win32 LCID value for the specified locale. If the ICU locale is not recognized by Windows, 0 will be returned.

Parameters:
localeID the locale to get the Win32 LCID value with
Returns:
country the Win32 LCID for localeID ICU 2.0

Definition at line 2024 of file uloc.c.

References U_FAILURE, U_ZERO_ERROR, and ULOC_FULLNAME_CAPACITY.

{
    UErrorCode status = U_ZERO_ERROR;
    char       langID[ULOC_FULLNAME_CAPACITY];

    uloc_getLanguage(localeID, langID, sizeof(langID), &status);
    if (U_FAILURE(status)) {
        return 0;
    }

    return uprv_convertToLCID(langID, localeID, &status);
}


Generated by  Doxygen 1.6.0   Back to index