Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to set the language used by glosario in Rmd document headers #14

Open
beatrizmilz opened this issue Aug 15, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@beatrizmilz
Copy link
Member

The function gdef() generates the link to the term in glosario in the page in english.
For example:

`r glosario::gdef('tidyverse', 'tidyverse')`

The link created is: https://carpentries.github.io/glosario/en/#tidyverse

Can we have an argument lang , so the function could create a link to pages in other languages?

Reference of the function:
https://carpentries.github.io/glosario-r/reference/gdef.html

Thank you!

@fmichonneau
Copy link
Contributor

Hi @beatrizmilz,

The documentation needs to be improved here. For now, this function reads the metadata from the Rmarkdown file hearder to select the language.

so if your RMarkdown document has:

---
glosario:
   language: 'pt'
---

in its header, the definitions will be displayed in Portuguese.

That being said, having a per-definition language selector might also be helpful.

@beatrizmilz
Copy link
Member Author

It worked! Thank you so much @fmichonneau !

If that's ok, I can try to make a PR and add this information on documentation.
This is the file, right?
https://github.com/carpentries/glosario-r/blob/master/R/gdef.R

@fmichonneau
Copy link
Contributor

Yes, this is the right file. That would be very useful. Thank you!

@fmichonneau fmichonneau changed the title Can gdef() have a argument for lang? Document how to set the language used by glosario in Rmd document headers Aug 18, 2020
@ian-flores ian-flores self-assigned this Apr 15, 2021
@ian-flores ian-flores added documentation Improvements or additions to documentation good first issue Good for newcomers labels Apr 15, 2021
@ian-flores ian-flores removed their assignment Apr 15, 2021
@ian-flores ian-flores moved this from To do to In progress in Glosario Project Board Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
Glosario Project Board
  
In progress
Development

No branches or pull requests

3 participants