Check language availability
is_available.RdCheck if a given language is available on the ODS platform from the list of languages contained in page_elements.
Arguments
- language
Character string.
- page_elements
List object from get_page(). Contains the title, description, template, language, content, tags and level of restriction of the page.
Examples
# Temporary directory for reproducible example
dir_tmp <- tempfile(pattern = "proj-")
dir.create(dir_tmp)
file.copy(from = system.file("examples/page_elements_example", package = "odsrmd"), to = dir_tmp)
#> [1] TRUE
page_elements <- readRDS(paste0(dir_tmp, "/page_elements_example"))
is_available("EN", page_elements)