1/* 2********************************************************************** 3* Copyright (C) 2004-2014, International Business Machines 4* Corporation and others. All Rights Reserved. 5********************************************************************** 6*/ 7 8#ifndef ULOCIMP_H 9#define ULOCIMP_H 10 11#include "unicode/uloc.h" 12 13/** 14 * Create an iterator over the specified keywords list 15 * @param keywordList double-null terminated list. Will be copied. 16 * @param keywordListSize size in bytes of keywordList 17 * @param status err code 18 * @return enumeration (owned by caller) of the keyword list. 19 * @internal ICU 3.0 20 */ 21U_CAPI UEnumeration* U_EXPORT2 22uloc_openKeywordList(const char *keywordList, int32_t keywordListSize, UErrorCode* status); 23 24/** 25 * Look up a resource bundle table item with fallback on the table level. 26 * This is accessible so it can be called by C++ code. 27 */ 28U_CAPI const UChar * U_EXPORT2 29uloc_getTableStringWithFallback( 30 const char *path, 31 const char *locale, 32 const char *tableKey, 33 const char *subTableKey, 34 const char *itemKey, 35 int32_t *pLength, 36 UErrorCode *pErrorCode); 37 38/*returns TRUE if a is an ID separator FALSE otherwise*/ 39#define _isIDSeparator(a) (a == '_' || a == '-') 40 41U_CFUNC const char* 42uloc_getCurrentCountryID(const char* oldID); 43 44U_CFUNC const char* 45uloc_getCurrentLanguageID(const char* oldID); 46 47U_CFUNC int32_t 48ulocimp_getLanguage(const char *localeID, 49 char *language, int32_t languageCapacity, 50 const char **pEnd); 51 52U_CFUNC int32_t 53ulocimp_getScript(const char *localeID, 54 char *script, int32_t scriptCapacity, 55 const char **pEnd); 56 57U_CFUNC int32_t 58ulocimp_getCountry(const char *localeID, 59 char *country, int32_t countryCapacity, 60 const char **pEnd); 61 62U_CAPI const char * U_EXPORT2 63locale_getKeywordsStart(const char *localeID); 64 65 66U_CFUNC UBool 67ultag_isUnicodeLocaleKey(const char* s, int32_t len); 68 69U_CFUNC UBool 70ultag_isUnicodeLocaleType(const char* s, int32_t len); 71 72U_CFUNC const char* 73ulocimp_toBcpKey(const char* key); 74 75U_CFUNC const char* 76ulocimp_toLegacyKey(const char* key); 77 78U_CFUNC const char* 79ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType); 80 81U_CFUNC const char* 82ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType); 83 84#endif 85