]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/ulocimp.h
2 **********************************************************************
3 * Copyright (C) 2004-2016, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
11 #include "unicode/uloc.h"
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.
21 U_CAPI UEnumeration
* U_EXPORT2
22 uloc_openKeywordList(const char *keywordList
, int32_t keywordListSize
, UErrorCode
* status
);
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.
28 U_CAPI
const UChar
* U_EXPORT2
29 uloc_getTableStringWithFallback(
33 const char *subTableKey
,
36 UErrorCode
*pErrorCode
);
38 /*returns TRUE if a is an ID separator FALSE otherwise*/
39 #define _isIDSeparator(a) (a == '_' || a == '-')
42 uloc_getCurrentCountryID(const char* oldID
);
45 uloc_getCurrentLanguageID(const char* oldID
);
48 ulocimp_getLanguage(const char *localeID
,
49 char *language
, int32_t languageCapacity
,
53 ulocimp_getScript(const char *localeID
,
54 char *script
, int32_t scriptCapacity
,
58 ulocimp_getCountry(const char *localeID
,
59 char *country
, int32_t countryCapacity
,
63 * Get the region to use for supplemental data lookup. Uses
64 * (1) any region specified by locale tag "rg"; if none then
65 * (2) any unicode_region_tag in the locale ID; if none then
66 * (3) if inferRegion is TRUE, the region suggested by
67 * getLikelySubtags on the localeID.
68 * If no region is found, returns length 0.
71 * The complete locale ID (with keywords) from which
72 * to get the region to use for supplemental data.
74 * If TRUE, will try to infer region from localeID if
75 * no other region is found.
77 * Buffer in which to put the region ID found; should
78 * have a capacity at least ULOC_COUNTRY_CAPACITY.
79 * @param regionCapacity
80 * The actual capacity of the region buffer.
82 * Pointer to in/out UErrorCode value for latest status.
84 * The length of any region code found, or 0 if none.
87 U_CAPI
int32_t U_EXPORT2
88 ulocimp_getRegionForSupplementalData(const char *localeID
, UBool inferRegion
,
89 char *region
, int32_t regionCapacity
, UErrorCode
* status
);
91 U_CAPI
const char * U_EXPORT2
92 locale_getKeywordsStart(const char *localeID
);
96 ultag_isUnicodeLocaleKey(const char* s
, int32_t len
);
99 ultag_isUnicodeLocaleType(const char* s
, int32_t len
);
102 ulocimp_toBcpKey(const char* key
);
105 ulocimp_toLegacyKey(const char* key
);
108 ulocimp_toBcpType(const char* key
, const char* type
, UBool
* isKnownKey
, UBool
* isSpecialType
);
111 ulocimp_toLegacyType(const char* key
, const char* type
, UBool
* isKnownKey
, UBool
* isSpecialType
);