ropensci-review-tools / babelquarto

Renders a Multilingual Quarto Project (Book or Website)
https://docs.ropensci.org/babelquarto/
Other
40 stars 7 forks source link

Controlling the title of the table of contents #86

Closed dmontecino closed 3 weeks ago

dmontecino commented 3 weeks ago

Hi. Thanks so much for the package . Works like a charm

I have 4 languages and I would like to control the title of the sidebar for each one of them. It seems in es, en, and fr this happens automatically (I doubt it)? but in km (Khmer) I get the default english title. I know I can Edit the html before rendering but I would like to accomplish this within R

Thanks!

maelle commented 3 weeks ago

:wave: @dmontecino! Thanks for your kind words.

The localization of these parts is something that happens in the Quarto side of thing. Some languages are natively supported, like French or Spanish. Others like Khmer are currently not supported, so Quarto falls back to English. You can however provide your own custom translation for any language code. The relevant documentation over at Quarto is https://quarto.org/docs/authoring/language.html#custom-translations (but maybe you can also suggest you and others add the Khmer translation? The docs link to https://github.com/quarto-dev/quarto-cli/tree/main/src/resources/language#contributing-localizations) I hope this helps!

Good luck!