Home | History | Annotate | Download | only in i18n

Lines Matching refs:variant

66 // CDFUnit represents a prefix-suffix pair for a particular variant
94 // Compute the plural variant for displayNum
157 static int32_t populatePrefixSuffix(const char* variant, int32_t log10Value, const UnicodeString& formatStr, UHashtable* result, UErrorCode& status);
162 static CDFUnit* createCDFUnit(const char* variant, int32_t log10Value, UHashtable* table, UErrorCode& status);
163 static const CDFUnit* getCDFUnitFallback(const UHashtable* table, const UnicodeString& variant, int32_t log10Value);
261 UnicodeString variant = _pluralRules->select(numberToFormat);
265 const CDFUnit* unit = getCDFUnitFallback(_unitsByVariant, variant, baseIdx);
716 const char* variant = ures_getKey(variantBundle);
724 if (uprv_strcmp(variant, gOther) == 0) {
728 variant, log10Value, formatStr, result->unitsByVariant, status);
745 // We expect to find an OTHER variant for each power of 10.
758 // given variant and log10 value.
759 // variant is 'zero', 'one', 'two', 'few', 'many', or 'other'.
767 const char* variant, int32_t log10Value, const UnicodeString& formatStr, UHashtable* result, UErrorCode& status) {
778 CDFUnit* unit = createCDFUnit(variant, log10Value, result, status);
842 // result data is complete if for each variant in result, there exists
847 // variant already had data. These are the same log10 values defined
853 // Then for each variant, it does the following. For each log10
856 // missing from given variant, copy the prefix-suffix pair for that
857 // log10 value from the 'other' variant.
872 // Iterate over each variant.
911 // variant and log10 value within table. If no such prefix-suffix pair is
913 static CDFUnit* createCDFUnit(const char* variant, int32_t log10Value, UHashtable* table, UErrorCode& status) {
917 CDFUnit *cdfUnit = (CDFUnit*) uhash_get(table, variant);
924 uhash_put(table, uprv_strdup(variant), cdfUnit, &status);
935 // variant and log10 value within table. If the given variant doesn't exist, it
936 // falls back to the OTHER variant. Therefore, this method will always return
938 static const CDFUnit* getCDFUnitFallback(const UHashtable* table, const UnicodeString& variant, int32_t log10Value) {
942 cvariant.appendInvariantChars(variant, status);