csl_locale_load: Load a CSL locale

View source: R/locale_load.R

csl_locale_loadR Documentation

Load a CSL locale

Description

Load a CSL locale

Usage

csl_locale_load(input, ...)

Arguments

input

URL or local file path

...

Curl options passed on to crul::HttpClient

Details

This function fetches the style XML document, and parses it into a more reasonble R list that's easy to navigate. If you want the raw XML, see locale_xml

Examples

## Not run: 
# Load a locale from the CSL github repo
de_DE <- 'https://github.com/citation-style-language/locales/raw/master/locales-de-DE.xml'
res <- csl_locale_load(de_DE)
## Query style information
res$info
res$info$translators
res$info$license
res$info$date_updated
res$dates
res$style_options
res$terms

# Load from a local style file
## just specify the style and we read from the local style files
csl_locale_load(input="fr-FR")

## End(Not run)

ropenscilabs/seasl documentation built on Sept. 12, 2022, 4:11 p.m.