Home | History | Annotate | Download | only in i18n

Lines Matching defs:currency

37 // Default currency meta data of last resort.  We try to use the
98 * Unfortunately, we have to convert the UChar* currency code to char*
102 myUCharsToChars(char* resultOfLen4, const UChar* currency) {
103 u_UCharsToChars(currency, resultOfLen4, ISO_COUNTRY_CODE_LENGTH);
109 * Internal function to look up currency data. Result is an array of
115 _findMetaData(const UChar* currency, UErrorCode& ec) {
117 if (currency == 0 || *currency == 0) {
136 // Look up our currency, or if that's not available, then DEFAULT
139 UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), NULL, &ec2);
304 * Release all static memory held by currency.
323 * There might be some cached currency data.
369 if ((resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus))) {
370 // there is a currency keyword. Try to see if it's valid
408 an old version of ICU that hasn't been updated yet. The latest currency is
475 ucurr_getName(const UChar* currency,
504 // fallback. That is, if a currency is not found in the en_US
524 myUCharsToChars(buf, currency);
565 *len = u_strlen(currency); // Should == ISO_COUNTRY_CODE_LENGTH, but maybe not...?
567 return currency;
571 ucurr_getPluralName(const UChar* currency,
604 myUCharsToChars(buf, currency);
623 return ucurr_getName(currency, locale, UCURR_LONG_NAME,
641 *len = u_strlen(currency); // Should == ISO_COUNTRY_CODE_LENGTH, but maybe not...?
643 return currency;
648 // Following are structure and function for parsing currency names
701 // Give a locale, return the maximum number of currency names associated with
703 // It gets currency names from resource bundles using fallback.
705 // currency names are duplicated.
706 // For example, given locale as "en_US", the currency names get from resource
708 // all currency names in "en_US" and "en".
741 ++(*total_currency_symbol_count); // currency symbol
749 // currency plurals
785 // Collect all available currency names associated with the give locale
789 // return the malloc-ed currency name arrays and the total number of currency
808 // Get maximum currency name count first.
816 const UChar* s = NULL; // currency name
817 char* iso = NULL; // currency ISO code
873 // Add currency symbol.
880 // Add currency long name.
889 // Add currency ISO code.
901 // currency plurals
923 // currency long name?
952 printf("currency name count: %d\n", *total_currency_name_count);
963 printf("currency symbol count: %d\n", *total_currency_symbol_count);
977 // @param currencyNames: currency names array
978 // @param indexInCurrencyNames: the index of the character in currency names
981 // @param begin(IN/OUT): the begin index of matching range in currency names array
982 // @param end(IN/OUT): the end index of matching range in currency names array.
1118 // Find longest match between "text" and currency names in "currencyNames".
1119 // @param total_currency_count: total number of currency names in CurrencyNames.
1136 // For example, given the currency names in currencyNames array are:
1140 // the first char in currency names, and find the first char matching range
1143 // the 2nd char in currency names, and narrow the matching range to
1175 //========================= currency name cache =====================
1178 // currency names, case insensitive
1180 int32_t totalCurrencyNameCount; // currency name count
1181 // currency symbols and ISO code, case sensitive
1343 // case in-sensitive comparision against currency names
1354 // case sensitive comparison against currency symbols and ISO code.
1383 * Internal method. Given a currency ISO code and a locale, return
1384 * the "static" currency name. This is usually the same as the
1389 * This is used for backward compatibility with old currency logic in
1403 // If this is a ChoiceFormat currency, then format an
1420 ucurr_getDefaultFractionDigits(const UChar* currency, UErrorCode* ec) {
1421 return (_findMetaData(currency, *ec))[0];
1425 ucurr_getRoundingIncrement(const UChar* currency, UErrorCode* ec) {
1426 const int32_t *data = _findMetaData(currency, *ec);
1461 const char *currency;
1772 for (int32_t idx = 0; gCurrencyList[idx].currency != NULL; idx++) {
1793 *resultLength = 3; /* Currency codes are only 3 chars long */
1795 return currItem->currency;
1864 resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
1884 // Using the id derived from the local, get the currency data
1887 // process each currency to see which one is valid for the given date
1892 // get the currency resource
1980 resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
2000 // Using the id derived from the local, get the currency data
2003 // process each currency to see which one is valid for the given date
2016 // get the currency resource
2090 // write out the currency value
2099 // return null terminated currency string
2205 // Currently active currency for the target country