Skip to content

Commit

Permalink
doc: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurData committed Sep 20, 2024
1 parent ecce8b1 commit 405238b
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 62 deletions.
77 changes: 75 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,84 @@
# I18n Extension For Quarto

_TODO_: Add a short description of your extension.
i18n extension for Quarto helps to manage multiple languages in your documents.

## Installing

```bash
quarto add ArthurData/quarto-i18n
```

More details to come...
> Requires Quarto >=1.5.0
## Usage

You can use it to manage multiple languages in your documents.

Firstly, you can use it with a default language:

```r
---
title: Revealjs i18n
format:
revealjs:
i18n:
defaultLocale: "it"
fr:
morning: "Le matin"
getting-up: "Se lever"
en:
morning: "In the morning"
getting-up: "Getting up"
de:
morning: "Morgen"
getting-up: "Aufstehen"
it:
morning: "Al mattino"
getting-up: "Alzarsi"
revealjs-plugins:
- i18n
---

<span data-i18n-key="morning"></span>

<span data-i18n-key="getting-up"></span>
```

or you can use it with a select input to change the language:

```r
---
title: Revealjs i18n
format:
revealjs:
footer: |
<select id="data-i18n-switcher" class="reaveljs-select">
<option selected class="drop-item" value="en">English</option>
<option class="drop-item" value="fr">French</option>
<option class="drop-item" value="de">Deutsch</option>
<option class="drop-item" value="it">Italian</option>
</select>
i18n:
defaultLocale: "fr"
fr:
morning: "Le matin"
getting-up: "Se lever"
en:
morning: "In the morning"
getting-up: "Getting up"
de:
morning: "Morgen"
getting-up: "Aufstehen"
it:
morning: "Al mattino"
getting-up: "Alzarsi"
revealjs-plugins:
- i18n
---

<span data-i18n-key="morning"></span>

<span data-i18n-key="getting-up"></span>
```

<img src="i18n.gif" width="100%"/></a>
Binary file added i18n.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 0 additions & 60 deletions translation.yaml

This file was deleted.

0 comments on commit 405238b

Please sign in to comment.