slide presentation change language of top title

100 views Asked by At

I would like to get Inhalt instead of Contents in the lower left corner of a slide presentation.

I tried

---
title: "Untitled"
author: "Erich Neuwirth"
date: "2022-09-28"
output:
  slidy_presentation:
    incremental: yes
    pandoc_args: [
      "--variable=lang:de"
    ]
---

## R Markdown
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

but this did not work.

2

There are 2 answers

0
shafee On

The lower left Contents could be changed to Inhalts using javascript code (sort of Brute-force way)

presentation.Rmd

---
title: "Untitled"
author: "Erich Neuwirth"
date: "2022-09-28"
output:
  slidy_presentation:
    incremental: yes
    includes:
      after_body: content-change.html
---

## R Markdown

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

content-change.html

<script>
  window.onload = function(){
    var content = document.querySelectorAll(".toolbar a")[1];
    content.innerText = "Inhalts";
};
</script>
1
Erich Neuwirth On

With this yaml head

---
title: "COVID-19 <br> Mathematische<br> und <br> statistische Analysen"
author: "Erich Neuwirth"
date: "29. September 2022<br><br><br><br><br>Informatiktag 2022"
output:
  slidy_presentation:
    incremental: yes
    includes:
      after_body: content-change.html    
lang: de
---

everything works file.

lang: de changes titles and similarar things to German. It just does not replace the Content link in the lower left corner.