-
Notifications
You must be signed in to change notification settings - Fork 2
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
Guidance on translating plots and tables #43
Comments
Oh, that's interesting! babeldown does nothing for code translation yet. I'll leave this open to check again later if ggplot2 introduces some sort of central locale definition. I imagine an ideal document to translate would have a "setup" code chunk with locale stuff, and babeldown could store/use some standard definitions by language. |
Sounds good. I also updated my example to reflect better that my label needs to be updated as well. :) But I think there is a growing desire for multilingual support, such as the (recent) addition of French in the RStudio IDE, and this issue to help toggle more easily between languages rstudio/rstudio#12223 in a document. Excited to see where this will lead! |
if babeldown were to ever translate strings in code, these would need to be marked up somehow. something to think about. |
Since RStudio added support for displaying label attribute in tooltip, it made me dig a little bit more on that and I am thinking this could be an interesting avenue to explore. I learned that gt applies the labels by default columns with a label attribute and ggplot2. mtcars |>
labelled::set_variable_labels(
vs = "a label"
) |>
gt::gt() ggplot2 has a PR opened to support this tidyverse/ggplot2#5879. I think this is an interesting framework to work with to standardize some labelling and translations. This would make it easier to translate plots and tables since it is easy to get a set of labels somewhere. I made this post a few months ago with not much luck unfortunately, https://fosstodon.org/@olivroy/111981211310295084 Having a data source where you store label attributes is pretty easy to use |
You can open this as a feature request in ggplot2, but as I work exclusively in English while Dutch is my native tongue, I don't really know what types of things are expected to change. |
For example, gt, or ggplot2.
I know gt started supporting a more centralized locale definition.
rstudio/gt#1347
In ggplot2, I don't think it's possible,
I mostly manually do
But I wonder if this package could possibly help or direct people to resources.
Nice work so far, excited to see what's next
Edited to add the translation of the label.
The text was updated successfully, but these errors were encountered: