ropensci-review-tools / babelquarto

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

[feature request] Allow user to change placement and appearance of language button #14

Closed joelnitta closed 9 months ago

joelnitta commented 9 months ago

Currently the button to access other languages automatically shows up as Version in <language code>, e.g. "Version in FR". It would be nice to be able to customize this (for example, some people may not know what "FR" refers to, or it may be preferable for the language link to appear in that language).

maelle commented 9 months ago

would this look ok in the config

babelquarto:
  mainlanguage: 'en'
  languages: ['fr']
  codes:
  - name: fr
    text: "Version en français"
  - name: en
    text: "English version"

or can you envision another interface in the config?

The registration functions would add placeholders (like for title-ja). The rendering function would use either the text, or fallback on what it currently does.

joelnitta commented 9 months ago

That looks fine to me, except that it doesn't specify where the language button goes. As far as I'm concerned, the current placement (next to the site title on the left side of the navbar) is fine, but others may want to put it somewhere else.

maelle commented 9 months ago

right, that would be more complicated. :thinking:

joelnitta commented 9 months ago

Perhaps just figure out the text itself now, and save the position for later (if someone asked for it?)

maelle commented 9 months ago

yep that's what I'm going for :grin: