### Example: Register Portuguese in a multilingual book
Source: https://docs.ropensci.org/babelquarto/reference/register_further_languages.html
Interactive example that creates a temporary multilingual book, then registers 'pt' as a further language. The configuration file is opened for inspection. The example is wrapped in if (FALSE) to avoid execution during package checks.
```R
if (FALSE) { # interactive()
parent_dir <- withr::local_tempdir()
quarto_multilingual_book(
parent_dir = parent_dir,
project_dir = "blop",
further_languages = c("es", "fr"),
main_language = "en"
)
register_further_languages(
"pt",
project_path = file.path(parent_dir, "blop")
)
# have a look at the configuration
file.edit(file.path(parent_dir, "blop", "_quarto.yml"))
}
```
--------------------------------
### Example: render_book() on a temporary project
Source: https://docs.ropensci.org/babelquarto/reference/render.html
Example that creates a temporary directory, generates a multilingual book project, and attempts to render it. The output shows errors because the project directory is not found, illustrating that the project must exist before rendering.
```r
directory <- withr::local_tempdir()
quarto_multilingual_book(parent_dir = directory, project_dir = "blop")
#> Error in setwd(dir = new): cannot change working directory
render_book(file.path(directory, "blop"))
#> Error in quarto::quarto_inspect(input = path, profile = profile): ! Error running quarto CLI from R.
#> Caused by error in `quarto::quarto_inspect()`:
#> ✖ Error returned by quarto CLI.
#> -----------------------------
#> ERROR: /tmp/RtmpnxyBlf/file66cfbbc25c/blop not found
#>
#> Stack trace:
#> at inspectConfig (file:///opt/quarto/bin/quarto.js:163919:11)
#> at _Command.actionHandler (file:///opt/quarto/bin/quarto.js:164109:27)
#> at async _Command.execute (file:///opt/quarto/bin/quarto.js:102102:7)
#> at async _Command.parseCommand (file:///opt/quarto/bin/quarto.js:101979:14)
#> at async quarto4 (file:///opt/quarto/bin/quarto.js:187653:5)
#> at async file:///opt/quarto/bin/quarto.js:187681:5
#> at async file:///opt/quarto/bin/quarto.js:187536:14
#> at async mainRunner (file:///opt/quarto/bin/quarto.js:187538:5)
#> at async file:///opt/quarto/bin/quarto.js:187674:3
#>
#> Caused by error in `processx::run()`:
#> ! System command 'quarto' failed
```
--------------------------------
### Example: Create a multilingual book with quarto_multilingual_book
Source: https://docs.ropensci.org/babelquarto/reference/quarto_multilingual_book.html
Example usage of quarto_multilingual_book() inside an interactive session. It creates a temporary directory and calls the function with parent_dir, project_dir, further_languages, and main_language.
```r
if (FALSE) { # interactive()
parent_dir <- withr::local_tempdir()
quarto_multilingual_book(
parent_dir = parent_dir,
project_dir = "blop",
further_languages = c("es", "fr"),
main_language = "en"
)
}
```
--------------------------------
### Example: register main language in a multilingual book
Source: https://docs.ropensci.org/babelquarto/reference/register_main_language.html
Example wrapped in if (FALSE) for interactive use. Creates a temporary multilingual book with further languages es and fr, then calls register_main_language() and opens the config file for inspection.
```r
if (FALSE) { # interactive()
parent_dir <- withr::local_tempdir()
quarto_multilingual_book(
parent_dir = parent_dir,
project_dir = "blop",
further_languages = c("es", "fr"),
main_language = "en",
register_languages = FALSE
)
book_path <- file.path(parent_dir, "blop")
register_main_language("en", book_path)
# have a look at the config
file.edit(file.path(parent_dir, "blop", "_quarto.yml"))
}
```
--------------------------------
### Install babelquarto from GitHub with pak
Source: https://docs.ropensci.org/babelquarto/index.html
Install babelquarto from GitHub using the pak package. The first line is commented out and assumes pak is already installed.
```r
# install.packages("pak")
pak::pak("ropensci-review-tools/babelquarto")
```
--------------------------------
### Preview multilingual project with servr::httw()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Starts a local server to preview the rendered multilingual website or book. Use '_site' for websites and '_book' for books. The function returns a URL to open in a browser.
```r
# For a multilingual website
servr::httw("_site")
# For a multilingual book
servr::httw("_book")
```
--------------------------------
### Example _quarto.yml configuration for multilingual website
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Example configuration file for a multilingual Quarto website. It sets the site URL, enables llms-txt, defines navbar links, and specifies babelquarto settings for language links, language codes, main language, and additional languages. Also includes translated metadata fields like title-es and description-fr.
```yaml
project:
type: website
website:
site-url: https://example.com
llms-txt: true
title: "multilingual_website"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd
format:
html:
theme:
- cosmo
- brand
css: styles.css
toc: true
babelquarto:
languagelinks: navbar
languagecodes:
- name: es
text: "Version in es"
- name: fr
text: "Version in fr"
- name: en
text: "Version in en"
mainlanguage: 'en'
languages: ['es', 'fr']
title-es: title in es
title-fr: title in fr
description-es: description in es
description-fr: description in fr
author-es: author in es
author-fr: author in fr
lang: en
```
--------------------------------
### Install babelquarto with pak
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Installs the babelquarto package using the pak package manager. Run this in R to install the package before using its functions.
```r
# install.packages("pak")
```
--------------------------------
### Install babelquarto from rOpenSci R-universe
Source: https://docs.ropensci.org/babelquarto/index.html
Install the development version of babelquarto from the rOpenSci R-universe repository.
```r
install.packages('babelquarto', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))
```
--------------------------------
### Create a Quarto book project
Source: https://docs.ropensci.org/babelquarto/articles/convert.html
Creates a temporary directory and a new Quarto book project named 'babelbook' using the quarto CLI. This is the starting point for the conversion workflow.
```r
parent_dir <- withr::local_tempdir()
project_dir <- "babelbook"
quarto_bin <- quarto::quarto_path()
withr::with_dir(parent_dir, {
sys::exec_wait(
quarto_bin,
args = c("create-project", project_dir, "--type", "book")
)
})
```
--------------------------------
### Language-specific profile: _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Example of a general Quarto configuration file for a project with English as the main language. It defines the website navbar with title and navigation links.
```yaml
website:
navbar:
title: "My Website"
left:
- label: "Home"
href: "index.qmd"
right:
- label: "About"
href: "about.qmd"
```
--------------------------------
### Generated _quarto.yml for a multilingual book
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Example of the _quarto.yml file generated by quarto_multilingual_book(). It includes the book configuration, language settings, and per-language metadata fields. The file is created in the project directory.
```YAML
project:
type: book
book:
site-url: https://example.com
llms-txt: true
title: "multilingual_book"
author: "Firstname Lastname"
date: "9/22/2026"
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
format:
html:
theme:
- cosmo
- brand
babelquarto:
languagelinks: sidebar
languagecodes:
- name: es
text: "Version in es"
- name: fr
text: "Version in fr"
- name: en
text: "Version in en"
mainlanguage: 'en'
languages: ['es', 'fr']
title-es: title in es
title-fr: title in fr
description-es: description in es
description-fr: description in fr
abstract-es: abstract in es
abstract-fr: abstract in fr
author-es: author in es
author-fr: author in fr
lang: en
```
--------------------------------
### Language-specific profile: _quarto-fr.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Example of a French language-specific profile that overrides the general configuration. It defines the website navbar with French labels and titles.
```yaml
website:
navbar:
title: "Mon site web"
left:
- label: "Accueil"
href: "index.qmd"
right:
- label: "À propos"
href: "about.qmd"
```
--------------------------------
### Set language switch icon to backpack in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Uses any Bootstrap icon for the language switch button. This example sets the icon to 'bi bi-backpack'. The button has id 'languages-button' and class 'babelquarto-languages-button' for CSS styling.
```yaml
babelquarto:
icon: "bi bi-backpack"
```
--------------------------------
### quarto_multilingual_website()
Source: https://docs.ropensci.org/babelquarto/reference/index.html
Creates a starter/example Quarto multilingual website project.
```APIDOC
## quarto_multilingual_website()
### Description
Creates a starter/example Quarto multilingual website project.
### Usage
quarto_multilingual_website()
```
--------------------------------
### quarto_multilingual_book()
Source: https://docs.ropensci.org/babelquarto/reference/index.html
Creates a starter/example Quarto multilingual book project.
```APIDOC
## quarto_multilingual_book()
### Description
Creates a starter/example Quarto multilingual book project.
### Usage
quarto_multilingual_book()
```
--------------------------------
### Usage of render_book() and render_website()
Source: https://docs.ropensci.org/babelquarto/reference/render.html
Shows the function signatures for render_book() and render_website(). Both take project_path, site_url, profile, and preview arguments. The preview argument defaults to rlang::is_interactive().
```r
render_book(
project_path = ".",
site_url = NULL,
profile = NULL,
preview = rlang::is_interactive()
)
render_website(
project_path = ".",
site_url = NULL,
profile = NULL,
preview = rlang::is_interactive()
)
```
--------------------------------
### Inspect project file structure with fs::dir_tree()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Displays the file tree of the created multilingual book project. Shows that each Quarto file has Spanish and French versions (e.g., index.es.qmd, index.fr.qmd).
```R
fs::dir_tree(file.path(parent_dir, project_dir))
```
--------------------------------
### Create a multilingual book with quarto_multilingual_book()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Creates a new multilingual Quarto book project in a temporary directory. Specify the parent directory, project name, main language, and additional languages. The function adds configuration for each language to the _quarto.yml file.
```R
parent_dir <- withr::local_tempdir()
project_dir <- "multilingual_book"
babelquarto::quarto_multilingual_book(
parent_dir = parent_dir,
project_dir = project_dir,
main_language = "en",
further_languages = c("es", "fr")
)
```
--------------------------------
### Create a multilingual website with quarto_multilingual_website()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Creates a new multilingual Quarto website project. Specify the parent directory, project name, main language, and additional languages. The site_url parameter can set the site-url field directly.
```R
parent_dir <- withr::local_tempdir()
project_dir <- "multilingual_website"
babelquarto::quarto_multilingual_website(
parent_dir = parent_dir,
project_dir = project_dir,
main_language = "en",
further_languages = c("es", "fr")
)
```
--------------------------------
### render_website(project_path, site_url, profile, preview)
Source: https://docs.ropensci.org/babelquarto/reference/render.html
Renders a multilingual Quarto website. It takes the project path, optional site URL override, Quarto profile(s), and a preview flag. The function is called for its side-effect of rendering the project.
```APIDOC
## render_website(project_path, site_url, profile, preview)
### Description
Renders a multilingual Quarto website. It takes the project path, optional site URL override, Quarto profile(s), and a preview flag. The function is called for its side-effect of rendering the project.
### Usage
```r
render_website(
project_path = ".",
site_url = NULL,
profile = NULL,
preview = rlang::is_interactive()
)
```
### Arguments
- **project_path** (character) - Path where the website source is located. Default is ".".
- **site_url** (character) - Override the base URL of the website. If `NULL`, in interactive sessions it will be set to "" to allow previewing the whole project with `servr::httw()`. Default is `NULL`.
- **profile** (character) - Quarto profile(s) to use. Default is `NULL`.
- **preview** (logical) - Logical indicating whether to preview the project using `servr::httw()`. Default is `rlang::is_interactive()`.
### Value
Nothing, called for its side-effect of rendering a project.
### Details
babelquarto expects a website folder with each qmd/Rmd present in as many languages as needed, with the same basename but:
- once with only `.qmd` as extension for the main language,
- once with `.es.qmd` (using the language code) for each other language.
You also need to register the language in the configuration file, see `register_main_language()` and `register_further_languages()`:
```yaml
babelquarto:
mainlanguage: 'en'
languages: ['es', 'fr']
```
### Examples
```r
directory <- withr::local_tempdir()
quarto_multilingual_book(parent_dir = directory, project_dir = "blop")
#> Error in setwd(dir = new): cannot change working directory
render_website(file.path(directory, "blop"))
#> Error in quarto::quarto_inspect(input = path, profile = profile): ! Error running quarto CLI from R.
#> Caused by error in `quarto::quarto_inspect()`:
#> ✖ Error returned by quarto CLI.
#> -----------------------------
#> ERROR: /tmp/RtmpnxyBlf/file66cfbbc25c/blop not found
#>
#> Stack trace:
#> at inspectConfig (file:///opt/quarto/bin/quarto.js:163919:11)
#> at _Command.actionHandler (file:///opt/quarto/bin/quarto.js:164109:27)
#> at async _Command.execute (file:///opt/quarto/bin/quarto.js:102102:7)
#> at async _Command.parseCommand (file:///opt/quarto/bin/quarto.js:101979:14)
#> at async quarto4 (file:///opt/quarto/bin/quarto.js:187653:5)
#> at async file:///opt/quarto/bin/quarto.js:187681:5
#> at async file:///opt/quarto/bin/quarto.js:187536:14
#> at async mainRunner (file:///opt/quarto/bin/quarto.js:187538:5)
#> at async file:///opt/quarto/bin/quarto.js:187674:3
#>
#> Caused by error in `processx::run()`:
#> ! System command 'quarto' failed
```
```
--------------------------------
### render_website()
Source: https://docs.ropensci.org/babelquarto/reference/index.html
Renders a Quarto multilingual website project.
```APIDOC
## render_website()
### Description
Renders a Quarto multilingual website project.
### Usage
render_website()
```
--------------------------------
### Configure base URL for website in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Sets the site-url for a website project. In interactive sessions, render_book() and render_website() automatically set site-url to "" for local previewing with servr::httw(). In CI contexts, set the BABELQUARTO_CI_URL environment variable.
```yaml
website:
site-url: https://example.com
```
--------------------------------
### Display project file structure with fs::dir_tree()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
R command to display the file tree of the project directory. The output shows the expected structure with _quarto.yml, translated Quarto files (about.es.qmd, about.fr.qmd, etc.), and styles.css.
```r
fs::dir_tree(file.path(parent_dir, project_dir))
```
```text
/tmp/RtmpPeXo6C/file8ad753592bd/multilingual_website
├── _quarto.yml
├── about.es.qmd
├── about.fr.qmd
├── about.qmd
├── index.es.qmd
├── index.fr.qmd
├── index.qmd
└── styles.css
```
--------------------------------
### Usage of quarto_multilingual_book and quarto_multilingual_website
Source: https://docs.ropensci.org/babelquarto/reference/quarto_multilingual_book.html
Shows the function signatures for creating a multilingual Quarto book or website. Both functions accept parent_dir, project_dir, main_language, further_languages, register_languages, site_url, and placement.
```r
quarto_multilingual_book(
parent_dir,
project_dir,
main_language = "en",
further_languages = c("es", "fr"),
register_languages = TRUE,
site_url = "https://example.com",
placement = c("sidebar", "navbar")
)
quarto_multilingual_website(
parent_dir,
project_dir,
main_language = "en",
further_languages = c("es", "fr"),
register_languages = TRUE,
site_url = "https://example.com",
placement = c("navbar", "sidebar")
)
```
--------------------------------
### Render the multilingual book with render_book()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Renders the multilingual book from within the project directory. The project_path argument defaults to '.' when called from the project root. Produces three books that cross-link from the sidebar.
```R
withr::with_dir(file.path(parent_dir, project_dir), {
babelquarto::render_book()
})
```
--------------------------------
### Render multilingual website with babelquarto::render_website()
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Renders the multilingual website using the babelquarto package. This function processes the project and generates the output site.
```r
babelquarto::render_website(file.path(parent_dir, project_dir))
```
--------------------------------
### Configure base URL for book in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Sets the site-url for a book project. You can also use the site_url argument of render_book() to temporarily override the site-url from the configuration file. In interactive sessions, render_book() and render_website() automatically set site-url to "" for local previewing with servr::httw().
```yaml
book:
site-url: https://example.com
```
--------------------------------
### render_book()
Source: https://docs.ropensci.org/babelquarto/reference/index.html
Renders a Quarto multilingual book project.
```APIDOC
## render_book()
### Description
Renders a Quarto multilingual book project.
### Usage
render_book()
```
--------------------------------
### Configure _quarto.yml with template-partials
Source: https://docs.ropensci.org/babelquarto/articles/custom-templates.html
Adds the metadata.html partial to the HTML format in _quarto.yml so Quarto uses it as a template partial.
```yaml
format:
html:
template-partials:
- metadata.html
```
--------------------------------
### Render locally with site_url for subpath-based sites
Source: https://docs.ropensci.org/babelquarto/articles/local-render.html
Pass the final website URL to babelquarto::render_book() to generate absolute URLs and ensure multilingual navigation works after deployment. Use this when building locally for a site served under a subpath, such as a GitHub Pages project site.
```R
babelquarto::render_book(
site_url = "https://username.github.io/repository-name/"
)
```
--------------------------------
### Usage: register_further_languages(further_languages, project_path)
Source: https://docs.ropensci.org/babelquarto/reference/register_further_languages.html
Shows the function signature. The function is called for its side-effect of editing the Quarto configuration file.
```R
register_further_languages(further_languages, project_path = ".")
```
--------------------------------
### Basic babelquarto configuration in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Shows the default babelquarto options added to _quarto.yml: languagelinks, languagecodes, mainlanguage, languages, and language-specific title, description, abstract, and author keys. The languagelinks can be 'sidebar' (default for books) or 'navbar' (default for websites). languagecodes entries have a name (language abbreviation) and text (link label). mainlanguage is the main language, and languages is an array of additional languages.
```yaml
babelquarto:
languagelinks: sidebar
languagecodes:
- name: es
text: "Version in es"
- name: fr
text: "Version in fr"
- name: en
text: "Version in en"
mainlanguage: 'en'
languages: ['es', 'fr']
title-es: title in es
title-fr: title in fr
description-es: description in es
description-fr: description in fr
abstract-es: abstract in es
abstract-fr: abstract in fr
author-es: author in es
author-fr: author in fr
lang: en
```
--------------------------------
### register_main_language()
Source: https://docs.ropensci.org/babelquarto/reference/index.html
Registers the main language in the Quarto configuration.
```APIDOC
## register_main_language()
### Description
Registers the main language in the Quarto configuration.
### Usage
register_main_language()
```
--------------------------------
### Register main language with babelquarto::register_main_language()
Source: https://docs.ropensci.org/babelquarto/articles/convert.html
Registers 'en' as the main language for the project. The function outputs '✔ Added configuration for en to 'config_path'.'.
```r
project_path <- file.path(parent_dir, project_dir)
withr::with_dir(project_path, {
babelquarto::register_main_language(main_language = "en")
})
```
--------------------------------
### Resulting _quarto.yml configuration
Source: https://docs.ropensci.org/babelquarto/articles/convert.html
Shows the _quarto.yml file after registering the main and further languages. It includes the babelquarto configuration with languagecodes, mainlanguage, languages, and per-language metadata fields.
```yaml
project:
type: book
book:
title: "babelbook"
author: "Norah Jones"
date: "9/22/2026"
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
format:
html:
theme:
- cosmo
- brand
pdf:
documentclass: scrreprt
babelquarto:
languagecodes:
- name: es
text: "Version in es"
- name: fr
text: "Version in fr"
- name: en
text: "Version in en"
mainlanguage: 'en'
languages: ['es', 'fr']
title-es: title in es
title-fr: title in fr
description-es: description in es
description-fr: description in fr
abstract-es: abstract in es
abstract-fr: abstract in fr
author-es: author in es
author-fr: author in fr
lang: en
```
--------------------------------
### register_main_language() usage
Source: https://docs.ropensci.org/babelquarto/reference/register_main_language.html
Function signature showing the default main_language = "en" and project_path = ".".
```r
register_main_language(main_language = "en", project_path = ".")
```
--------------------------------
### Use lang-en and lang-fr in metadata.html
Source: https://docs.ropensci.org/babelquarto/articles/custom-templates.html
Shows how to conditionally include a publisher meta tag for English and French renders using babelquarto's language variables and pandoc's $if()$ syntax. The comment indicates to copy the original content from Quarto's metadata.html.
```html
$if(lang-en)$
$endif$
$if(lang-fr)$
$endif$
```
--------------------------------
### Output of babelquarto::multilingualize() for English
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Confirmation message shown after adding English language configuration to the _quarto.yml file.
```text
✔ Added configuration for en to 'config_path'.
```
--------------------------------
### Configuration for multilingual project
Source: https://docs.ropensci.org/babelquarto/reference/render.html
YAML configuration snippet showing how to register the main language and additional languages for a babelquarto project. The main language is set to 'en' and further languages are listed as 'es' and 'fr'.
```yaml
babelquarto:
mainlanguage: 'en'
languages: ['es', 'fr']
```
--------------------------------
### register_further_languages()
Source: https://docs.ropensci.org/babelquarto/reference/index.html
Registers further languages in the Quarto configuration.
```APIDOC
## register_further_languages()
### Description
Registers further languages in the Quarto configuration.
### Usage
register_further_languages()
```
--------------------------------
### Translate part titles in multilingual book in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Shows how to translate part titles in a multilingual book using part-xx keys. For each additional language, add a part-xx key (e.g., part-fr) to the part entry to provide the translated title.
```yaml
book:
chapters:
- index.qmd
- part: Foreword
part-fr: Préface
chapters:
- foreword.qmd
- part: Explore
part-fr: Explorer
chapters:
- intro-explore.qmd
- data-visualisation.qmd
```
--------------------------------
### Output of babelquarto::multilingualize() for Spanish and French
Source: https://docs.ropensci.org/babelquarto/articles/babelquarto.html
Confirmation message shown after adding Spanish and French language configuration to the _quarto.yml file.
```text
✔ Added configuration for es, fr to 'config_path'.
```
--------------------------------
### Set BABELQUARTO_CI_URL environment variable in GitHub Actions workflow
Source: https://docs.ropensci.org/babelquarto/articles/render-with-ci.html
Use this snippet in a GitHub Actions workflow to set the BABELQUARTO_CI_URL environment variable, which overrides the site URL from _quarto.yml for CI previews. Replace with the actual URL.
```yaml
env:
BABELQUARTO_CI_URL:
```
--------------------------------
### Register further languages with babelquarto::register_further_languages()
Source: https://docs.ropensci.org/babelquarto/articles/convert.html
Adds Spanish and French as further languages. The function outputs '✔ Added configuration for es, fr to 'config_path'.'.
```r
withr::with_dir(project_path, {
babelquarto::register_further_languages(further_languages = c("es", "fr"))
})
```
--------------------------------
### Set babelquarto.quiet option to TRUE
Source: https://docs.ropensci.org/babelquarto/index.html
Set the babelquarto.quiet option to TRUE to suppress messages such as "Edited `_quarto.yml`".
```r
options("babelquarto.quiet" = TRUE)
```
--------------------------------
### Custom language menu labels in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Shows how to customize the language menu labels by adding text fields under babelquarto/languagecodes. Use this to display 'English' and 'Español' instead of 'Version in en' and 'Version in es'. The register_main_language() and register_further_languages() functions create the boilerplate for these fields.
```yaml
babelquarto:
languagecodes:
- name: es
text: "Español"
- name: en
text: "English"
```
--------------------------------
### read_yaml(path)
Source: https://docs.ropensci.org/babelquarto/reference/read_yaml.html
Reads a YAML file and returns its contents as a list. This function is an alias for yaml::read_yaml with a custom handler.
```APIDOC
## read_yaml(path)
### Description
Alias for yaml::read_yaml with a custom handler.
### Usage
read_yaml(path)
### Arguments
- **path** (character) - Path to yaml file.
### Value
A list.
### Examples
```r
if (FALSE) { # \dontrun{
read_yaml(path)
} # }
```
```
--------------------------------
### Remove language switch icon in _quarto.yml
Source: https://docs.ropensci.org/babelquarto/articles/configuration.html
Sets the icon to an empty string to display no icon on the language switch button. The button has id 'languages-button' and class 'babelquarto-languages-button' for CSS styling.
```yaml
babelquarto:
icon: ""
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.