14

I would like to create aggregation reports based on ggplot2 and knitr. Unfortunately I want to do it in four languages, namely English, German, French, Italian. So far labels for plots and figures are basically coming from data itself, i.e. they are generated from data.frame headers or factor levels.

Given that I have more than 100 categorical variables with different levels I wonder what an efficient translation strategy might be. There's .po files and Portable Object editors for other languages and even for R and its messages itself. Given that the number of languages might be increased it becomes more likely that other persons need to be involved for translation. Obviously these persons are typically no R users and might not even like text editors.

Has anybody faced the same problem and has developed some good strategy or experience to share? Could you imagine something xliff like?

EDIT: I have seen this thread in the meantime but I believe gettext does only work for packages. I wonder if the domain in this post is really valid.

Community
  • 1
  • 1
Matt Bannert
  • 27,631
  • 38
  • 141
  • 207

1 Answers1

1

No direct experience myself, but wondering if a google spreadsheet might be provide a good workflow for collaborating with translators e.g. then get into R using RCurl solutions such as answer here:

read.csv fails to read a CSV file from google docs

I used this technique to analyse survey data.

Community
  • 1
  • 1
paulusm
  • 786
  • 6
  • 19
  • That could work, if your variable names can stay the same in every language. Create a Google spreadsheet with one variable per row and levels in their correct order in columns `2:n`. Create one sheet per language. After you load your data, loop through the rows of the desired sheet and modify the levels of your variables when you find a translation. – Fr. Jul 24 '13 at 18:00