API change proposal: Resource Bundle API changes
Vladimir Weinstein <[email protected]> Wed, 05 Nov 2003 11:38:18 -0800
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
Expiration: 11/12/2003
Add APIs:
/**
* Return the name of the Locale associated with this ResourceBundle.
* You can choose between requested, valid and real locale.
*
* @param resourceBundle resource bundle in question
* @param type You can choose between requested, valid and actual
* locale. For description see the definition of
* ULocDataLocaleType in uloc.h
* @param status just for catching illegal arguments
* @return A Locale name
* @draft ICU 2.8
*/
U_CAPI const char* U_EXPORT2
ures_getLocaleByType(const UResourceBundle* resourceBundle,
ULocDataLocaleType type,
UErrorCode* status);
/**
* Return the Locale associated with this ResourceBundle.
* @param type You can choose between requested, valid and actual
* locale. For description see the definition of
* ULocDataLocaleType in uloc.h
* @param status just for catching illegal arguments
*
* @return a Locale object
* @draft ICU 2.8
*/
const Locale &getLocale(ULocDataLocaleType type, UErrorCode &status) const;
Motivation: new getLocale APIs allow for finer selection of what kind of locale
is required. Requested locale is the locale that was passed to the API. Valid
locale is the most specific locale ICU supports, while the actual (real) locale
is the locale where the actual data comes from.
Deprecate:
ures_getLocale - will be superseded by ures_getLocaleByType
ResourceBundle::getLocale - will be superseded by ResourceBundle::getLocale overload
ures_countArrayItems - superseded by ures_getSize
ures_getVersionNumber - superseded by ures_getVersion
ResourceBundle::getVersionNumber - superseded by ResourceBundle::getVersion
Motivation: There are APIs that do the task in a more appropriate way.
Regards,
v.
--
Vladimir Weinstein, IBM GCoC-Unicode/ICU San Jose, CA [email protected]