From 14ebe596c31a4221b73e4ca8f5c014ee3ead56c2 Mon Sep 17 00:00:00 2001 From: pvictor Date: Wed, 24 Nov 2021 17:10:28 +0100 Subject: [PATCH] added i18n explanations in readme and vignette --- README.md | 14 +++++++++ man/figures/i18n/al.svg | 5 +++ man/figures/i18n/br.svg | 45 +++++++++++++++++++++++++++ man/figures/i18n/fr.svg | 7 +++++ man/figures/i18n/gb.svg | 7 +++++ man/figures/i18n/mk.svg | 5 +++ man/figures/i18n/pt.svg | 57 +++++++++++++++++++++++++++++++++++ vignettes/figures/i18n/al.svg | 5 +++ vignettes/figures/i18n/br.svg | 45 +++++++++++++++++++++++++++ vignettes/figures/i18n/fr.svg | 7 +++++ vignettes/figures/i18n/gb.svg | 7 +++++ vignettes/figures/i18n/mk.svg | 5 +++ vignettes/figures/i18n/pt.svg | 57 +++++++++++++++++++++++++++++++++++ vignettes/get-started.Rmd | 16 ++++++++++ 14 files changed, 282 insertions(+) create mode 100644 man/figures/i18n/al.svg create mode 100644 man/figures/i18n/br.svg create mode 100644 man/figures/i18n/fr.svg create mode 100644 man/figures/i18n/gb.svg create mode 100644 man/figures/i18n/mk.svg create mode 100644 man/figures/i18n/pt.svg create mode 100644 vignettes/figures/i18n/al.svg create mode 100644 vignettes/figures/i18n/br.svg create mode 100644 vignettes/figures/i18n/fr.svg create mode 100644 vignettes/figures/i18n/gb.svg create mode 100644 vignettes/figures/i18n/mk.svg create mode 100644 vignettes/figures/i18n/pt.svg diff --git a/README.md b/README.md index 67c1508c..f015fbd9 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,17 @@ Above gif was made with :heart: by [@mfanny](https://github.com/mfanny) and cann ![](man/figures/esquisse.png) +### Internationalization + +Currently you can use {esquisse} in the following language: english (default), french (`"fr"`), macedonian (`"mk"`), albanian (`"sq"`). Activate with: + +```r +library(esquisse) +set_i18n("fr") +esquisser() +``` + +If you want another language to be supported, you can submit a Pull Request to add a CSV file like the one used for french (file is located in `inst/i18n` folder in the package, you can see it [here on GitHub](https://github.com/dreamRs/esquisse/blob/master/inst/i18n/fr.csv)). + +See [{datamods} vignette](https://dreamrs.github.io/datamods/articles/i18n.html) for more on this topic. + diff --git a/man/figures/i18n/al.svg b/man/figures/i18n/al.svg new file mode 100644 index 00000000..e831b028 --- /dev/null +++ b/man/figures/i18n/al.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/man/figures/i18n/br.svg b/man/figures/i18n/br.svg new file mode 100644 index 00000000..3252a8ec --- /dev/null +++ b/man/figures/i18n/br.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/man/figures/i18n/fr.svg b/man/figures/i18n/fr.svg new file mode 100644 index 00000000..712c8a5d --- /dev/null +++ b/man/figures/i18n/fr.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/man/figures/i18n/gb.svg b/man/figures/i18n/gb.svg new file mode 100644 index 00000000..132dbedb --- /dev/null +++ b/man/figures/i18n/gb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/man/figures/i18n/mk.svg b/man/figures/i18n/mk.svg new file mode 100644 index 00000000..1f1eaf68 --- /dev/null +++ b/man/figures/i18n/mk.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/man/figures/i18n/pt.svg b/man/figures/i18n/pt.svg new file mode 100644 index 00000000..fa9621f2 --- /dev/null +++ b/man/figures/i18n/pt.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vignettes/figures/i18n/al.svg b/vignettes/figures/i18n/al.svg new file mode 100644 index 00000000..e831b028 --- /dev/null +++ b/vignettes/figures/i18n/al.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/vignettes/figures/i18n/br.svg b/vignettes/figures/i18n/br.svg new file mode 100644 index 00000000..3252a8ec --- /dev/null +++ b/vignettes/figures/i18n/br.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vignettes/figures/i18n/fr.svg b/vignettes/figures/i18n/fr.svg new file mode 100644 index 00000000..712c8a5d --- /dev/null +++ b/vignettes/figures/i18n/fr.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vignettes/figures/i18n/gb.svg b/vignettes/figures/i18n/gb.svg new file mode 100644 index 00000000..132dbedb --- /dev/null +++ b/vignettes/figures/i18n/gb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vignettes/figures/i18n/mk.svg b/vignettes/figures/i18n/mk.svg new file mode 100644 index 00000000..1f1eaf68 --- /dev/null +++ b/vignettes/figures/i18n/mk.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/vignettes/figures/i18n/pt.svg b/vignettes/figures/i18n/pt.svg new file mode 100644 index 00000000..fa9621f2 --- /dev/null +++ b/vignettes/figures/i18n/pt.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vignettes/get-started.Rmd b/vignettes/get-started.Rmd index 2f61dd9c..1da9fa71 100644 --- a/vignettes/get-started.Rmd +++ b/vignettes/get-started.Rmd @@ -152,3 +152,19 @@ You can set display mode with an option (in .Rprofile for example) : options("esquisse.viewer" = "browser") ``` + + +### Internationalization + +Currently you can use {esquisse} in the following language: english (default), french (`"fr"`), macedonian (`"mk"`), albanian (`"sq"`). Activate with: + +```{r} +library(esquisse) +set_i18n("fr") +esquisser() +``` + +If you want another language to be supported, you can submit a Pull Request to add a CSV file like the one used for french (file is located in `inst/i18n` folder in the package, you can see it [here on GitHub](https://github.com/dreamRs/esquisse/blob/master/inst/i18n/fr.csv)). + +See [{datamods} vignette](https://dreamrs.github.io/datamods/articles/i18n.html) for more on this topic. +