Learn R Programming

i18n (version 0.2.0)

cldr_numbers: Get a single localized value from the numbers dataset

Description

The numbers table contains localization data for number usage and this data is available for 574 locales. The cldr_numbers() function allows one to extract a named list using a locale and a specific element. The element values are:

  • "default_numbering_system"

  • "other_numbering_systems"

  • "minimum_grouping_digits"

  • "decimal"

  • "group"

  • "list"

  • "percent_sign"

  • "plus_sign"

  • "minus_sign"

  • "approx_sign"

  • "exp_sign"

  • "sup_exp"

  • "per_mille"

  • "infinity"

  • "nan"

  • "time_sep"

  • "approx_pattern"

  • "at_least_pattern"

  • "at_most_pattern"

  • "range_pattern"

  • "decimal_format"

  • "sci_format"

  • "percent_format"

  • "currency_format"

  • "accounting_format"

Usage

cldr_numbers(
  locale = "en",
  element = numbers_elements$default_numbering_system
)

Value

Either a named list or a length one character vector, depending on the element value.

Arguments

locale

The locale ID for which to obtain the data from the numbers table.

element

The element from which information will be obtained for the specified locale.