ICU 72.1 72.1

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

## ◆ UDisplayOptionsCapitalization

typedef enum UDisplayOptionsCapitalization UDisplayOptionsCapitalization

Represents all the capitalization options.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ UDisplayOptionsDisplayLength

typedef enum UDisplayOptionsDisplayLength UDisplayOptionsDisplayLength

Represents all the display lengths.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ UDisplayOptionsGrammaticalCase

typedef enum UDisplayOptionsGrammaticalCase UDisplayOptionsGrammaticalCase

Represents all the grammatical cases that are supported by CLDR.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ UDisplayOptionsNameStyle

typedef enum UDisplayOptionsNameStyle UDisplayOptionsNameStyle

Represents all the dialect handlings.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ UDisplayOptionsNounClass

typedef enum UDisplayOptionsNounClass UDisplayOptionsNounClass

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

Draft:
  This API may be changed in the future versions and was introduced in ICU 72.

## ◆ UDisplayOptionsPluralCategory

typedef enum UDisplayOptionsPluralCategory UDisplayOptionsPluralCategory

Standard CLDR plural form/category constants.

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

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ UDisplayOptionsSubstituteHandling

typedef enum UDisplayOptionsSubstituteHandling UDisplayOptionsSubstituteHandling

Represents all the substitute handling.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## Enumeration Type Documentation

## ◆ UDisplayOptionsCapitalization

enum UDisplayOptionsCapitalization

Represents all the capitalization options.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

Enumerator
UDISPOPT_CAPITALIZATION_UNDEFINED | A possible setting for Capitalization. The capitalization context to be used is unknown (this is the default value). Draft: This API may be changed in the future versions and was introduced in 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. Draft: This API may be changed in the future versions and was introduced in 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. Draft: This API may be changed in the future versions and was introduced in 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. Draft: This API may be changed in the future versions and was introduced in 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. Draft: This API may be changed in the future versions and was introduced in ICU 72

Definition at line 185 of file udisplayoptions.h.

## ◆ UDisplayOptionsDisplayLength

enum UDisplayOptionsDisplayLength

Represents all the display lengths.

Draft:
  This API may be changed in the future versions and was introduced in 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). Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_DISPLAY_LENGTH_FULL | Uses full names when generating a locale name, e.g. "United States" for US. Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_DISPLAY_LENGTH_SHORT | Use short names when generating a locale name, e.g. "U.S." for US. Draft: This API may be changed in the future versions and was introduced in ICU 72

Definition at line 264 of file udisplayoptions.h.

## ◆ UDisplayOptionsGrammaticalCase

enum UDisplayOptionsGrammaticalCase

Represents all the grammatical cases that are supported by CLDR.

Draft:
  This API may be changed in the future versions and was introduced in 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). Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_ABLATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_ACCUSATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_COMITATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_DATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_ERGATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_GENITIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_INSTRUMENTAL | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_LOCATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_LOCATIVE_COPULATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_NOMINATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_OBLIQUE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_PREPOSITIONAL | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_SOCIATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_GRAMMATICAL_CASE_VOCATIVE | Draft: This API may be changed in the future versions and was introduced in ICU 72

Definition at line 28 of file udisplayoptions.h.

## ◆ UDisplayOptionsNameStyle

enum UDisplayOptionsNameStyle

Represents all the dialect handlings.

Draft:
  This API may be changed in the future versions and was introduced in 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). Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_NAME_STYLE_STANDARD_NAMES | Use standard names when generating a locale name, e.g. en_GB displays as 'English (United Kingdom)'. Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_NAME_STYLE_DIALECT_NAMES | Use dialect names, when generating a locale name, e.g. en_GB displays as 'British English'. Draft: This API may be changed in the future versions and was introduced in ICU 72

Definition at line 233 of file udisplayoptions.h.

## ◆ UDisplayOptionsNounClass

enum UDisplayOptionsNounClass

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

Draft:
  This API may be changed in the future versions and was introduced in 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). Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_NOUN_CLASS_OTHER | ICU 72.
UDISPOPT_NOUN_CLASS_NEUTER | ICU 72.
UDISPOPT_NOUN_CLASS_FEMININE | ICU 72.
UDISPOPT_NOUN_CLASS_MASCULINE | ICU 72.
UDISPOPT_NOUN_CLASS_ANIMATE | ICU 72.
UDISPOPT_NOUN_CLASS_INANIMATE | ICU 72.
UDISPOPT_NOUN_CLASS_PERSONAL | ICU 72.
UDISPOPT_NOUN_CLASS_COMMON | ICU 72.

Definition at line 136 of file udisplayoptions.h.

## ◆ UDisplayOptionsPluralCategory

enum UDisplayOptionsPluralCategory

Standard CLDR plural form/category constants.

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

Draft:
  This API may be changed in the future versions and was introduced in 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). Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_PLURAL_CATEGORY_ZERO | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_PLURAL_CATEGORY_ONE | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_PLURAL_CATEGORY_TWO | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_PLURAL_CATEGORY_FEW | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_PLURAL_CATEGORY_MANY | Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_PLURAL_CATEGORY_OTHER | Draft: This API may be changed in the future versions and was introduced in ICU 72

Definition at line 89 of file udisplayoptions.h.

## ◆ UDisplayOptionsSubstituteHandling

enum UDisplayOptionsSubstituteHandling

Represents all the substitute handling.

Draft:
  This API may be changed in the future versions and was introduced in 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). Draft: This API may be changed in the future versions and was introduced in 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. Draft: This API may be changed in the future versions and was introduced in ICU 72
UDISPOPT_SUBSTITUTE_HANDLING_NO_SUBSTITUTE | Returns a null value when no data is available. Draft: This API may be changed in the future versions and was introduced in ICU 72

Definition at line 295 of file udisplayoptions.h.

## Function Documentation

## ◆ udispopt_fromGrammaticalCaseIdentifier()

U_CAPI UDisplayOptionsGrammaticalCase udispopt_fromGrammaticalCaseIdentifier | ( | const char * | identifier | ) |

Parameters

  identifier | in lower case such as "dative" or "nominative"

Returns
  the plural category corresponding to the identifier, or `UDISPOPT_GRAMMATICAL_CASE_UNDEFINED`

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ udispopt_fromNounClassIdentifier()

U_CAPI UDisplayOptionsNounClass udispopt_fromNounClassIdentifier | ( | const char * | identifier | ) |

Parameters

  identifier | in lower case such as "feminine" or "masculine"

Returns
  the plural category corresponding to the identifier, or `UDISPOPT_NOUN_CLASS_UNDEFINED`

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ udispopt_fromPluralCategoryIdentifier()

U_CAPI UDisplayOptionsPluralCategory udispopt_fromPluralCategoryIdentifier | ( | const char * | identifier | ) |

Parameters

  identifier | for example "few" or "other"

Returns
  the plural category corresponding to the identifier (plural keyword), or `UDISPOPT_PLURAL_CATEGORY_UNDEFINED`

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ udispopt_getGrammaticalCaseIdentifier()

U_CAPI const char* udispopt_getGrammaticalCaseIdentifier | ( | UDisplayOptionsGrammaticalCase | grammaticalCase | ) |

Parameters

  grammaticalCase | The grammatical case.

Returns
  the lowercase CLDR keyword string for the grammatical case.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ udispopt_getNounClassIdentifier()

U_CAPI const char* udispopt_getNounClassIdentifier | ( | UDisplayOptionsNounClass | nounClass | ) |

Parameters

  nounClass | The noun class.

Returns
  the lowercase CLDR keyword string for the noun class.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72

## ◆ udispopt_getPluralCategoryIdentifier()

U_CAPI const char* udispopt_getPluralCategoryIdentifier | ( | UDisplayOptionsPluralCategory | pluralCategory | ) |

Parameters

  pluralCategory | The plural category.

Returns
  the lowercase CLDR identifier string for the plural category.

Draft:
  This API may be changed in the future versions and was introduced in ICU 72