Skip to contents

Retrieve all languages available on the ODS platform from the information contained in page_elements.

Usage

get_languages(page_elements, verbose = TRUE)

Arguments

page_elements

List object from get_page(). Contains the title, description, template, language, content, tags and level of restriction of the page.

verbose

A logical TRUE/FALSE indicating if the function should output a message listing the languages available on the platform.

Value

A vector of characters.

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"))

all_languages <- get_languages(page_elements)
#> Languages available on the platform: EN, FR.