xref: /aosp_15_r20/external/icu/libandroidicu/include/unicode/uldnames.h (revision 0e209d3975ff4a8c132096b14b0e9364a753506e)
1*0e209d39SAndroid Build Coastguard Worker // © 2016 and later: Unicode, Inc. and others.
2*0e209d39SAndroid Build Coastguard Worker // License & terms of use: http://www.unicode.org/copyright.html
3*0e209d39SAndroid Build Coastguard Worker /*
4*0e209d39SAndroid Build Coastguard Worker *******************************************************************************
5*0e209d39SAndroid Build Coastguard Worker *   Copyright (C) 2010-2016, International Business Machines Corporation and
6*0e209d39SAndroid Build Coastguard Worker *   others.  All Rights Reserved.
7*0e209d39SAndroid Build Coastguard Worker *******************************************************************************
8*0e209d39SAndroid Build Coastguard Worker */
9*0e209d39SAndroid Build Coastguard Worker 
10*0e209d39SAndroid Build Coastguard Worker #ifndef __ULDNAMES_H__
11*0e209d39SAndroid Build Coastguard Worker #define __ULDNAMES_H__
12*0e209d39SAndroid Build Coastguard Worker 
13*0e209d39SAndroid Build Coastguard Worker /**
14*0e209d39SAndroid Build Coastguard Worker  * \file
15*0e209d39SAndroid Build Coastguard Worker  * \brief C API: Provides display names of Locale ids and their components.
16*0e209d39SAndroid Build Coastguard Worker  */
17*0e209d39SAndroid Build Coastguard Worker 
18*0e209d39SAndroid Build Coastguard Worker #include "unicode/utypes.h"
19*0e209d39SAndroid Build Coastguard Worker #include "unicode/uscript.h"
20*0e209d39SAndroid Build Coastguard Worker #include "unicode/udisplaycontext.h"
21*0e209d39SAndroid Build Coastguard Worker 
22*0e209d39SAndroid Build Coastguard Worker #if U_SHOW_CPLUSPLUS_API
23*0e209d39SAndroid Build Coastguard Worker #include "unicode/localpointer.h"
24*0e209d39SAndroid Build Coastguard Worker #endif   // U_SHOW_CPLUSPLUS_API
25*0e209d39SAndroid Build Coastguard Worker 
26*0e209d39SAndroid Build Coastguard Worker /**
27*0e209d39SAndroid Build Coastguard Worker  * Enum used in LocaleDisplayNames::createInstance.
28*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
29*0e209d39SAndroid Build Coastguard Worker  */
30*0e209d39SAndroid Build Coastguard Worker typedef enum {
31*0e209d39SAndroid Build Coastguard Worker     /**
32*0e209d39SAndroid Build Coastguard Worker      * Use standard names when generating a locale name,
33*0e209d39SAndroid Build Coastguard Worker      * e.g. en_GB displays as 'English (United Kingdom)'.
34*0e209d39SAndroid Build Coastguard Worker      * @stable ICU 4.4
35*0e209d39SAndroid Build Coastguard Worker      */
36*0e209d39SAndroid Build Coastguard Worker     ULDN_STANDARD_NAMES = 0,
37*0e209d39SAndroid Build Coastguard Worker     /**
38*0e209d39SAndroid Build Coastguard Worker      * Use dialect names, when generating a locale name,
39*0e209d39SAndroid Build Coastguard Worker      * e.g. en_GB displays as 'British English'.
40*0e209d39SAndroid Build Coastguard Worker      * @stable ICU 4.4
41*0e209d39SAndroid Build Coastguard Worker      */
42*0e209d39SAndroid Build Coastguard Worker     ULDN_DIALECT_NAMES
43*0e209d39SAndroid Build Coastguard Worker } UDialectHandling;
44*0e209d39SAndroid Build Coastguard Worker 
45*0e209d39SAndroid Build Coastguard Worker /**
46*0e209d39SAndroid Build Coastguard Worker  * Opaque C service object type for the locale display names API
47*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
48*0e209d39SAndroid Build Coastguard Worker  */
49*0e209d39SAndroid Build Coastguard Worker struct ULocaleDisplayNames;
50*0e209d39SAndroid Build Coastguard Worker 
51*0e209d39SAndroid Build Coastguard Worker /**
52*0e209d39SAndroid Build Coastguard Worker  * C typedef for struct ULocaleDisplayNames.
53*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
54*0e209d39SAndroid Build Coastguard Worker  */
55*0e209d39SAndroid Build Coastguard Worker typedef struct ULocaleDisplayNames ULocaleDisplayNames;
56*0e209d39SAndroid Build Coastguard Worker 
57*0e209d39SAndroid Build Coastguard Worker #if !UCONFIG_NO_FORMATTING
58*0e209d39SAndroid Build Coastguard Worker 
59*0e209d39SAndroid Build Coastguard Worker /**
60*0e209d39SAndroid Build Coastguard Worker  * Returns an instance of LocaleDisplayNames that returns names
61*0e209d39SAndroid Build Coastguard Worker  * formatted for the provided locale, using the provided
62*0e209d39SAndroid Build Coastguard Worker  * dialectHandling.  The usual value for dialectHandling is
63*0e209d39SAndroid Build Coastguard Worker  * ULOC_STANDARD_NAMES.
64*0e209d39SAndroid Build Coastguard Worker  *
65*0e209d39SAndroid Build Coastguard Worker  * @param locale the display locale
66*0e209d39SAndroid Build Coastguard Worker  * @param dialectHandling how to select names for locales
67*0e209d39SAndroid Build Coastguard Worker  * @return a ULocaleDisplayNames instance
68*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
69*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
70*0e209d39SAndroid Build Coastguard Worker  */
71*0e209d39SAndroid Build Coastguard Worker U_CAPI ULocaleDisplayNames * U_EXPORT2
72*0e209d39SAndroid Build Coastguard Worker uldn_open(const char * locale,
73*0e209d39SAndroid Build Coastguard Worker           UDialectHandling dialectHandling,
74*0e209d39SAndroid Build Coastguard Worker           UErrorCode *pErrorCode);
75*0e209d39SAndroid Build Coastguard Worker 
76*0e209d39SAndroid Build Coastguard Worker /**
77*0e209d39SAndroid Build Coastguard Worker  * Closes a ULocaleDisplayNames instance obtained from uldn_open().
78*0e209d39SAndroid Build Coastguard Worker  * @param ldn the ULocaleDisplayNames instance to be closed
79*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
80*0e209d39SAndroid Build Coastguard Worker  */
81*0e209d39SAndroid Build Coastguard Worker U_CAPI void U_EXPORT2
82*0e209d39SAndroid Build Coastguard Worker uldn_close(ULocaleDisplayNames *ldn);
83*0e209d39SAndroid Build Coastguard Worker 
84*0e209d39SAndroid Build Coastguard Worker #if U_SHOW_CPLUSPLUS_API
85*0e209d39SAndroid Build Coastguard Worker 
86*0e209d39SAndroid Build Coastguard Worker U_NAMESPACE_BEGIN
87*0e209d39SAndroid Build Coastguard Worker 
88*0e209d39SAndroid Build Coastguard Worker /**
89*0e209d39SAndroid Build Coastguard Worker  * \class LocalULocaleDisplayNamesPointer
90*0e209d39SAndroid Build Coastguard Worker  * "Smart pointer" class, closes a ULocaleDisplayNames via uldn_close().
91*0e209d39SAndroid Build Coastguard Worker  * For most methods see the LocalPointerBase base class.
92*0e209d39SAndroid Build Coastguard Worker  *
93*0e209d39SAndroid Build Coastguard Worker  * @see LocalPointerBase
94*0e209d39SAndroid Build Coastguard Worker  * @see LocalPointer
95*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
96*0e209d39SAndroid Build Coastguard Worker  */
97*0e209d39SAndroid Build Coastguard Worker U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDisplayNamesPointer, ULocaleDisplayNames, uldn_close);
98*0e209d39SAndroid Build Coastguard Worker 
99*0e209d39SAndroid Build Coastguard Worker U_NAMESPACE_END
100*0e209d39SAndroid Build Coastguard Worker 
101*0e209d39SAndroid Build Coastguard Worker #endif
102*0e209d39SAndroid Build Coastguard Worker 
103*0e209d39SAndroid Build Coastguard Worker /* getters for state */
104*0e209d39SAndroid Build Coastguard Worker 
105*0e209d39SAndroid Build Coastguard Worker /**
106*0e209d39SAndroid Build Coastguard Worker  * Returns the locale used to determine the display names. This is
107*0e209d39SAndroid Build Coastguard Worker  * not necessarily the same locale passed to {@link #uldn_open}.
108*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
109*0e209d39SAndroid Build Coastguard Worker  * @return the display locale
110*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
111*0e209d39SAndroid Build Coastguard Worker  */
112*0e209d39SAndroid Build Coastguard Worker U_CAPI const char * U_EXPORT2
113*0e209d39SAndroid Build Coastguard Worker uldn_getLocale(const ULocaleDisplayNames *ldn);
114*0e209d39SAndroid Build Coastguard Worker 
115*0e209d39SAndroid Build Coastguard Worker /**
116*0e209d39SAndroid Build Coastguard Worker  * Returns the dialect handling used in the display names.
117*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
118*0e209d39SAndroid Build Coastguard Worker  * @return the dialect handling enum
119*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
120*0e209d39SAndroid Build Coastguard Worker  */
121*0e209d39SAndroid Build Coastguard Worker U_CAPI UDialectHandling U_EXPORT2
122*0e209d39SAndroid Build Coastguard Worker uldn_getDialectHandling(const ULocaleDisplayNames *ldn);
123*0e209d39SAndroid Build Coastguard Worker 
124*0e209d39SAndroid Build Coastguard Worker /* names for entire locales */
125*0e209d39SAndroid Build Coastguard Worker 
126*0e209d39SAndroid Build Coastguard Worker /**
127*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided locale.
128*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
129*0e209d39SAndroid Build Coastguard Worker  * @param locale the locale whose display name to return
130*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
131*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
132*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
133*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
134*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
135*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
136*0e209d39SAndroid Build Coastguard Worker  */
137*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
138*0e209d39SAndroid Build Coastguard Worker uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
139*0e209d39SAndroid Build Coastguard Worker                        const char *locale,
140*0e209d39SAndroid Build Coastguard Worker                        UChar *result,
141*0e209d39SAndroid Build Coastguard Worker                        int32_t maxResultSize,
142*0e209d39SAndroid Build Coastguard Worker                        UErrorCode *pErrorCode);
143*0e209d39SAndroid Build Coastguard Worker 
144*0e209d39SAndroid Build Coastguard Worker /* names for components of a locale */
145*0e209d39SAndroid Build Coastguard Worker 
146*0e209d39SAndroid Build Coastguard Worker /**
147*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided language code.
148*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
149*0e209d39SAndroid Build Coastguard Worker  * @param lang the language code whose display name to return
150*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
151*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
152*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
153*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
154*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
155*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
156*0e209d39SAndroid Build Coastguard Worker  */
157*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
158*0e209d39SAndroid Build Coastguard Worker uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
159*0e209d39SAndroid Build Coastguard Worker                          const char *lang,
160*0e209d39SAndroid Build Coastguard Worker                          UChar *result,
161*0e209d39SAndroid Build Coastguard Worker                          int32_t maxResultSize,
162*0e209d39SAndroid Build Coastguard Worker                          UErrorCode *pErrorCode);
163*0e209d39SAndroid Build Coastguard Worker 
164*0e209d39SAndroid Build Coastguard Worker /**
165*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided script.
166*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
167*0e209d39SAndroid Build Coastguard Worker  * @param script the script whose display name to return
168*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
169*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
170*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
171*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
172*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
173*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
174*0e209d39SAndroid Build Coastguard Worker  */
175*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
176*0e209d39SAndroid Build Coastguard Worker uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
177*0e209d39SAndroid Build Coastguard Worker                        const char *script,
178*0e209d39SAndroid Build Coastguard Worker                        UChar *result,
179*0e209d39SAndroid Build Coastguard Worker                        int32_t maxResultSize,
180*0e209d39SAndroid Build Coastguard Worker                        UErrorCode *pErrorCode);
181*0e209d39SAndroid Build Coastguard Worker 
182*0e209d39SAndroid Build Coastguard Worker /**
183*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided script code.
184*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
185*0e209d39SAndroid Build Coastguard Worker  * @param scriptCode the script code whose display name to return
186*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
187*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
188*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
189*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
190*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
191*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
192*0e209d39SAndroid Build Coastguard Worker  */
193*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
194*0e209d39SAndroid Build Coastguard Worker uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
195*0e209d39SAndroid Build Coastguard Worker                            UScriptCode scriptCode,
196*0e209d39SAndroid Build Coastguard Worker                            UChar *result,
197*0e209d39SAndroid Build Coastguard Worker                            int32_t maxResultSize,
198*0e209d39SAndroid Build Coastguard Worker                            UErrorCode *pErrorCode);
199*0e209d39SAndroid Build Coastguard Worker 
200*0e209d39SAndroid Build Coastguard Worker /**
201*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided region code.
202*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
203*0e209d39SAndroid Build Coastguard Worker  * @param region the region code whose display name to return
204*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
205*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
206*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
207*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
208*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
209*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
210*0e209d39SAndroid Build Coastguard Worker  */
211*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
212*0e209d39SAndroid Build Coastguard Worker uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
213*0e209d39SAndroid Build Coastguard Worker                        const char *region,
214*0e209d39SAndroid Build Coastguard Worker                        UChar *result,
215*0e209d39SAndroid Build Coastguard Worker                        int32_t maxResultSize,
216*0e209d39SAndroid Build Coastguard Worker                        UErrorCode *pErrorCode);
217*0e209d39SAndroid Build Coastguard Worker 
218*0e209d39SAndroid Build Coastguard Worker /**
219*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided variant
220*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
221*0e209d39SAndroid Build Coastguard Worker  * @param variant the variant whose display name to return
222*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
223*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
224*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
225*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
226*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
227*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
228*0e209d39SAndroid Build Coastguard Worker  */
229*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
230*0e209d39SAndroid Build Coastguard Worker uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
231*0e209d39SAndroid Build Coastguard Worker                         const char *variant,
232*0e209d39SAndroid Build Coastguard Worker                         UChar *result,
233*0e209d39SAndroid Build Coastguard Worker                         int32_t maxResultSize,
234*0e209d39SAndroid Build Coastguard Worker                         UErrorCode *pErrorCode);
235*0e209d39SAndroid Build Coastguard Worker 
236*0e209d39SAndroid Build Coastguard Worker /**
237*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided locale key
238*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
239*0e209d39SAndroid Build Coastguard Worker  * @param key the locale key whose display name to return
240*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
241*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
242*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
243*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
244*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
245*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
246*0e209d39SAndroid Build Coastguard Worker  */
247*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
248*0e209d39SAndroid Build Coastguard Worker uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
249*0e209d39SAndroid Build Coastguard Worker                     const char *key,
250*0e209d39SAndroid Build Coastguard Worker                     UChar *result,
251*0e209d39SAndroid Build Coastguard Worker                     int32_t maxResultSize,
252*0e209d39SAndroid Build Coastguard Worker                     UErrorCode *pErrorCode);
253*0e209d39SAndroid Build Coastguard Worker 
254*0e209d39SAndroid Build Coastguard Worker /**
255*0e209d39SAndroid Build Coastguard Worker  * Returns the display name of the provided value (used with the provided key).
256*0e209d39SAndroid Build Coastguard Worker  * @param ldn the LocaleDisplayNames instance
257*0e209d39SAndroid Build Coastguard Worker  * @param key the locale key
258*0e209d39SAndroid Build Coastguard Worker  * @param value the locale key's value
259*0e209d39SAndroid Build Coastguard Worker  * @param result receives the display name
260*0e209d39SAndroid Build Coastguard Worker  * @param maxResultSize the size of the result buffer
261*0e209d39SAndroid Build Coastguard Worker  * @param pErrorCode the status code
262*0e209d39SAndroid Build Coastguard Worker  * @return the actual buffer size needed for the display name.  If it's
263*0e209d39SAndroid Build Coastguard Worker  * greater than maxResultSize, the returned name will be truncated.
264*0e209d39SAndroid Build Coastguard Worker  * @stable ICU 4.4
265*0e209d39SAndroid Build Coastguard Worker  */
266*0e209d39SAndroid Build Coastguard Worker U_CAPI int32_t U_EXPORT2
267*0e209d39SAndroid Build Coastguard Worker uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
268*0e209d39SAndroid Build Coastguard Worker                          const char *key,
269*0e209d39SAndroid Build Coastguard Worker                          const char *value,
270*0e209d39SAndroid Build Coastguard Worker                          UChar *result,
271*0e209d39SAndroid Build Coastguard Worker                          int32_t maxResultSize,
272*0e209d39SAndroid Build Coastguard Worker                          UErrorCode *pErrorCode);
273*0e209d39SAndroid Build Coastguard Worker 
274*0e209d39SAndroid Build Coastguard Worker /**
275*0e209d39SAndroid Build Coastguard Worker * Returns an instance of LocaleDisplayNames that returns names formatted
276*0e209d39SAndroid Build Coastguard Worker * for the provided locale, using the provided UDisplayContext settings.
277*0e209d39SAndroid Build Coastguard Worker *
278*0e209d39SAndroid Build Coastguard Worker * @param locale The display locale
279*0e209d39SAndroid Build Coastguard Worker * @param contexts List of one or more context settings (e.g. for dialect
280*0e209d39SAndroid Build Coastguard Worker *               handling, capitalization, etc.
281*0e209d39SAndroid Build Coastguard Worker * @param length Number of items in the contexts list
282*0e209d39SAndroid Build Coastguard Worker * @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates
283*0e209d39SAndroid Build Coastguard Worker *               a failure status, the function will do nothing; otherwise this will be
284*0e209d39SAndroid Build Coastguard Worker *               updated with any new status from the function.
285*0e209d39SAndroid Build Coastguard Worker * @return a ULocaleDisplayNames instance
286*0e209d39SAndroid Build Coastguard Worker * @stable ICU 51
287*0e209d39SAndroid Build Coastguard Worker */
288*0e209d39SAndroid Build Coastguard Worker U_CAPI ULocaleDisplayNames * U_EXPORT2
289*0e209d39SAndroid Build Coastguard Worker uldn_openForContext(const char * locale, UDisplayContext *contexts,
290*0e209d39SAndroid Build Coastguard Worker                     int32_t length, UErrorCode *pErrorCode);
291*0e209d39SAndroid Build Coastguard Worker 
292*0e209d39SAndroid Build Coastguard Worker /**
293*0e209d39SAndroid Build Coastguard Worker * Returns the UDisplayContext value for the specified UDisplayContextType.
294*0e209d39SAndroid Build Coastguard Worker * @param ldn the ULocaleDisplayNames instance
295*0e209d39SAndroid Build Coastguard Worker * @param type the UDisplayContextType whose value to return
296*0e209d39SAndroid Build Coastguard Worker * @param pErrorCode Pointer to UErrorCode input/output status. If at entry this indicates
297*0e209d39SAndroid Build Coastguard Worker *               a failure status, the function will do nothing; otherwise this will be
298*0e209d39SAndroid Build Coastguard Worker *               updated with any new status from the function.
299*0e209d39SAndroid Build Coastguard Worker * @return the UDisplayContextValue for the specified type.
300*0e209d39SAndroid Build Coastguard Worker * @stable ICU 51
301*0e209d39SAndroid Build Coastguard Worker */
302*0e209d39SAndroid Build Coastguard Worker U_CAPI UDisplayContext U_EXPORT2
303*0e209d39SAndroid Build Coastguard Worker uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
304*0e209d39SAndroid Build Coastguard Worker                 UErrorCode *pErrorCode);
305*0e209d39SAndroid Build Coastguard Worker 
306*0e209d39SAndroid Build Coastguard Worker #endif  /* !UCONFIG_NO_FORMATTING */
307*0e209d39SAndroid Build Coastguard Worker #endif  /* __ULDNAMES_H__ */
308