Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stri_locale_info

Query Given Locale


Description

Provides some basic information on a given locale identifier.

Usage

stri_locale_info(locale = NULL)

Arguments

locale

NULL or '' for default locale, or a single string with locale identifier.

Details

With this function you may obtain some basic information on any provided locale identifier, even if it is unsupported by ICU or if you pass a malformed locale identifier (the one that is not, e.g., of the form Language_Country). See stringi-locale for discussion.

This function does not do anything really complicated. In many cases it is similar to a call to as.list(stri_split_fixed(locale, '_', 3L)[[1]]), with locale case mapped. It may be used, however, to get insight on how ICU understands a given locale identifier.

Value

Returns a list with the following named character strings: Language, Country, Variant, and Name, being their underscore separated combination.

See Also

Other locale_management: about_locale, stri_locale_list(), stri_locale_set()

Examples

stri_locale_info('pl_PL')
stri_locale_info('Pl_pL') # the same result

stringi

Character String Processing Facilities

v1.6.1
file LICENSE
Authors
Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); IBM, Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
Initial release
2021-05-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.