ICU 78.3  78.3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Enumerations | Functions
udisplayoptions.h File Reference

C API: Display options (enum types, values, helper functions) More...

#include "unicode/utypes.h"
#include "unicode/uversion.h"

Go to the source code of this file.

Typedefs

typedef enum
UDisplayOptionsGrammaticalCase 
UDisplayOptionsGrammaticalCase
 Represents all the grammatical cases that are supported by CLDR. More...
 
typedef enum
UDisplayOptionsPluralCategory 
UDisplayOptionsPluralCategory
 Standard CLDR plural form/category constants. More...
 
typedef enum
UDisplayOptionsNounClass 
UDisplayOptionsNounClass
 Represents all the grammatical noun classes that are supported by CLDR. More...
 
typedef enum
UDisplayOptionsCapitalization 
UDisplayOptionsCapitalization
 Represents all the capitalization options. More...
 
typedef enum
UDisplayOptionsNameStyle 
UDisplayOptionsNameStyle
 Represents all the dialect handlings. More...
 
typedef enum
UDisplayOptionsDisplayLength 
UDisplayOptionsDisplayLength
 Represents all the display lengths. More...
 
typedef enum
UDisplayOptionsSubstituteHandling 
UDisplayOptionsSubstituteHandling
 Represents all the substitute handling. More...
 

Enumerations

enum  UDisplayOptionsGrammaticalCase {
  UDISPOPT_GRAMMATICAL_CASE_UNDEFINED = 0, UDISPOPT_GRAMMATICAL_CASE_ABLATIVE = 1, UDISPOPT_GRAMMATICAL_CASE_ACCUSATIVE = 2, UDISPOPT_GRAMMATICAL_CASE_COMITATIVE = 3,
  UDISPOPT_GRAMMATICAL_CASE_DATIVE = 4, UDISPOPT_GRAMMATICAL_CASE_ERGATIVE = 5, UDISPOPT_GRAMMATICAL_CASE_GENITIVE = 6, UDISPOPT_GRAMMATICAL_CASE_INSTRUMENTAL = 7,
  UDISPOPT_GRAMMATICAL_CASE_LOCATIVE = 8, UDISPOPT_GRAMMATICAL_CASE_LOCATIVE_COPULATIVE = 9, UDISPOPT_GRAMMATICAL_CASE_NOMINATIVE = 10, UDISPOPT_GRAMMATICAL_CASE_OBLIQUE = 11,
  UDISPOPT_GRAMMATICAL_CASE_PREPOSITIONAL = 12, UDISPOPT_GRAMMATICAL_CASE_SOCIATIVE = 13, UDISPOPT_GRAMMATICAL_CASE_VOCATIVE = 14
}
 Represents all the grammatical cases that are supported by CLDR. More...
 
enum  UDisplayOptionsPluralCategory {
  UDISPOPT_PLURAL_CATEGORY_UNDEFINED = 0, UDISPOPT_PLURAL_CATEGORY_ZERO = 1, UDISPOPT_PLURAL_CATEGORY_ONE = 2, UDISPOPT_PLURAL_CATEGORY_TWO = 3,
  UDISPOPT_PLURAL_CATEGORY_FEW = 4, UDISPOPT_PLURAL_CATEGORY_MANY = 5, UDISPOPT_PLURAL_CATEGORY_OTHER = 6
}
 Standard CLDR plural form/category constants. More...
 
enum  UDisplayOptionsNounClass {
  UDISPOPT_NOUN_CLASS_UNDEFINED = 0, UDISPOPT_NOUN_CLASS_OTHER = 1, UDISPOPT_NOUN_CLASS_NEUTER = 2, UDISPOPT_NOUN_CLASS_FEMININE = 3,
  UDISPOPT_NOUN_CLASS_MASCULINE = 4, UDISPOPT_NOUN_CLASS_ANIMATE = 5, UDISPOPT_NOUN_CLASS_INANIMATE = 6, UDISPOPT_NOUN_CLASS_PERSONAL = 7,
  UDISPOPT_NOUN_CLASS_COMMON = 8
}
 Represents all the grammatical noun classes that are supported by CLDR. More...
 
enum  UDisplayOptionsCapitalization {
  UDISPOPT_CAPITALIZATION_UNDEFINED = 0, UDISPOPT_CAPITALIZATION_BEGINNING_OF_SENTENCE = 1, UDISPOPT_CAPITALIZATION_MIDDLE_OF_SENTENCE = 2, UDISPOPT_CAPITALIZATION_STANDALONE = 3,
  UDISPOPT_CAPITALIZATION_UI_LIST_OR_MENU = 4
}
 Represents all the capitalization options. More...
 
enum  UDisplayOptionsNameStyle { UDISPOPT_NAME_STYLE_UNDEFINED = 0, UDISPOPT_NAME_STYLE_STANDARD_NAMES = 1, UDISPOPT_NAME_STYLE_DIALECT_NAMES = 2 }
 Represents all the dialect handlings. More...
 
enum  UDisplayOptionsDisplayLength { UDISPOPT_DISPLAY_LENGTH_UNDEFINED = 0, UDISPOPT_DISPLAY_LENGTH_FULL = 1, UDISPOPT_DISPLAY_LENGTH_SHORT = 2 }
 Represents all the display lengths. More...
 
enum  UDisplayOptionsSubstituteHandling { UDISPOPT_SUBSTITUTE_HANDLING_UNDEFINED = 0, UDISPOPT_SUBSTITUTE_HANDLING_SUBSTITUTE = 1, UDISPOPT_SUBSTITUTE_HANDLING_NO_SUBSTITUTE = 2 }
 Represents all the substitute handling. More...
 

Functions

U_CAPI const char * udispopt_getGrammaticalCaseIdentifier (UDisplayOptionsGrammaticalCase grammaticalCase)
 
U_CAPI
UDisplayOptionsGrammaticalCase 
udispopt_fromGrammaticalCaseIdentifier (const char *identifier)
 
U_CAPI const char * udispopt_getPluralCategoryIdentifier (UDisplayOptionsPluralCategory pluralCategory)
 
U_CAPI
UDisplayOptionsPluralCategory 
udispopt_fromPluralCategoryIdentifier (const char *identifier)
 
U_CAPI const char * udispopt_getNounClassIdentifier (UDisplayOptionsNounClass nounClass)
 
U_CAPI UDisplayOptionsNounClass udispopt_fromNounClassIdentifier (const char *identifier)
 

Detailed Description

C API: Display options (enum types, values, helper functions)

These display options are designed to be used in class DisplayOptions as a more modern version of the UDisplayContext mechanism.

Definition in file udisplayoptions.h.

Typedef Documentation

Represents all the capitalization options.

Stable:
ICU 72

Represents all the display lengths.

Stable:
ICU 72

Represents all the grammatical cases that are supported by CLDR.

Stable:
ICU 72

Represents all the dialect handlings.

Stable:
ICU 72

Represents all the grammatical noun classes that are supported by CLDR.

Stable:
ICU 72.

Standard CLDR plural form/category constants.

See https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules

Stable:
ICU 72

Represents all the substitute handling.

Stable:
ICU 72

Enumeration Type Documentation

Represents all the capitalization options.

Stable:
ICU 72
Enumerator
UDISPOPT_CAPITALIZATION_UNDEFINED 

A possible setting for Capitalization.

The capitalization context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_CAPITALIZATION_BEGINNING_OF_SENTENCE 

The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for the beginning of a sentence.

Stable:
ICU 72
UDISPOPT_CAPITALIZATION_MIDDLE_OF_SENTENCE 

The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for the middle of a sentence.

Stable:
ICU 72
UDISPOPT_CAPITALIZATION_STANDALONE 

The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.

Stable:
ICU 72
UDISPOPT_CAPITALIZATION_UI_LIST_OR_MENU 

The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for a user-interface list or menu item.

Stable:
ICU 72

Definition at line 183 of file udisplayoptions.h.

Represents all the display lengths.

Stable:
ICU 72
Enumerator
UDISPOPT_DISPLAY_LENGTH_UNDEFINED 

A possible setting for DisplayLength.

The DisplayLength context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_DISPLAY_LENGTH_FULL 

Uses full names when generating a locale name, e.g.

"United States" for US.

Stable:
ICU 72
UDISPOPT_DISPLAY_LENGTH_SHORT 

Use short names when generating a locale name, e.g.

"U.S." for US.

Stable:
ICU 72

Definition at line 262 of file udisplayoptions.h.

Represents all the grammatical cases that are supported by CLDR.

Stable:
ICU 72
Enumerator
UDISPOPT_GRAMMATICAL_CASE_UNDEFINED 

A possible setting for GrammaticalCase.

The grammatical case context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_ABLATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_ACCUSATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_COMITATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_DATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_ERGATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_GENITIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_INSTRUMENTAL 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_LOCATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_LOCATIVE_COPULATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_NOMINATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_OBLIQUE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_PREPOSITIONAL 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_SOCIATIVE 
Stable:
ICU 72
UDISPOPT_GRAMMATICAL_CASE_VOCATIVE 
Stable:
ICU 72

Definition at line 26 of file udisplayoptions.h.

Represents all the dialect handlings.

Stable:
ICU 72
Enumerator
UDISPOPT_NAME_STYLE_UNDEFINED 

A possible setting for NameStyle.

The NameStyle context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_NAME_STYLE_STANDARD_NAMES 

Use standard names when generating a locale name, e.g.

en_GB displays as 'English (United Kingdom)'.

Stable:
ICU 72
UDISPOPT_NAME_STYLE_DIALECT_NAMES 

Use dialect names, when generating a locale name, e.g.

en_GB displays as 'British English'.

Stable:
ICU 72

Definition at line 231 of file udisplayoptions.h.

Represents all the grammatical noun classes that are supported by CLDR.

Stable:
ICU 72.
Enumerator
UDISPOPT_NOUN_CLASS_UNDEFINED 

A possible setting for NounClass.

The noun class case context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_NOUN_CLASS_OTHER 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_NEUTER 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_FEMININE 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_MASCULINE 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_ANIMATE 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_INANIMATE 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_PERSONAL 
Stable:
ICU 72
UDISPOPT_NOUN_CLASS_COMMON 
Stable:
ICU 72

Definition at line 134 of file udisplayoptions.h.

Standard CLDR plural form/category constants.

See https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules

Stable:
ICU 72
Enumerator
UDISPOPT_PLURAL_CATEGORY_UNDEFINED 

A possible setting for PluralCategory.

The plural category case context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_PLURAL_CATEGORY_ZERO 
Stable:
ICU 72
UDISPOPT_PLURAL_CATEGORY_ONE 
Stable:
ICU 72
UDISPOPT_PLURAL_CATEGORY_TWO 
Stable:
ICU 72
UDISPOPT_PLURAL_CATEGORY_FEW 
Stable:
ICU 72
UDISPOPT_PLURAL_CATEGORY_MANY 
Stable:
ICU 72
UDISPOPT_PLURAL_CATEGORY_OTHER 
Stable:
ICU 72

Definition at line 87 of file udisplayoptions.h.

Represents all the substitute handling.

Stable:
ICU 72
Enumerator
UDISPOPT_SUBSTITUTE_HANDLING_UNDEFINED 

A possible setting for SubstituteHandling.

The SubstituteHandling context to be used is unknown (this is the default value).

Stable:
ICU 72
UDISPOPT_SUBSTITUTE_HANDLING_SUBSTITUTE 

Returns a fallback value (e.g., the input code) when no data is available.

This is the default behaviour.

Stable:
ICU 72
UDISPOPT_SUBSTITUTE_HANDLING_NO_SUBSTITUTE 

Returns a null value when no data is available.

Stable:
ICU 72

Definition at line 293 of file udisplayoptions.h.

Function Documentation

U_CAPI UDisplayOptionsGrammaticalCase udispopt_fromGrammaticalCaseIdentifier ( const char *  identifier)
Parameters
identifierin lower case such as "dative" or "nominative"
Returns
the plural category corresponding to the identifier, or UDISPOPT_GRAMMATICAL_CASE_UNDEFINED
Stable:
ICU 72
U_CAPI UDisplayOptionsNounClass udispopt_fromNounClassIdentifier ( const char *  identifier)
Parameters
identifierin lower case such as "feminine" or "masculine"
Returns
the plural category corresponding to the identifier, or UDISPOPT_NOUN_CLASS_UNDEFINED
Stable:
ICU 72
U_CAPI UDisplayOptionsPluralCategory udispopt_fromPluralCategoryIdentifier ( const char *  identifier)
Parameters
identifierfor example "few" or "other"
Returns
the plural category corresponding to the identifier (plural keyword), or UDISPOPT_PLURAL_CATEGORY_UNDEFINED
Stable:
ICU 72
U_CAPI const char* udispopt_getGrammaticalCaseIdentifier ( UDisplayOptionsGrammaticalCase  grammaticalCase)
Parameters
grammaticalCaseThe grammatical case.
Returns
the lowercase CLDR keyword string for the grammatical case.
Stable:
ICU 72
U_CAPI const char* udispopt_getNounClassIdentifier ( UDisplayOptionsNounClass  nounClass)
Parameters
nounClassThe noun class.
Returns
the lowercase CLDR keyword string for the noun class.
Stable:
ICU 72
U_CAPI const char* udispopt_getPluralCategoryIdentifier ( UDisplayOptionsPluralCategory  pluralCategory)
Parameters
pluralCategoryThe plural category.
Returns
the lowercase CLDR identifier string for the plural category.
Stable:
ICU 72