[Rd] Internationalizing the Rcmdr package?

John Fox jfox at mcmaster.ca
Sat May 21 19:37:12 CEST 2005

Dear R-devel list members,

I'm considering adding support for other languages than English to the Rcmdr
package. I understand that the use of Tcl/Tk by the Rcmdr package means I
won't be able to make full use of the internationalization facilities in R
2.1.0. I'm interested, therefore, in whether the following, more limited,
strategy (which bears some similarity to the internationalization facilities
in R) seems reasonable or whether there's a better approach. As well, I'm
interested in whether the proposed approach is sufficiently flexible to be
worthwhile -- does it cover enough languages?

It would be simple for me to provide a file of messages, labels, and other
text used by the Rcmdr, organizing this file with one message per line. A
copy of the file, named, e.g., messages.francais, could contain translations
into another language (e.g, French). Setting
options(Rcmdr=list(language=francais)) would then activate translation when
the Rcmdr starts up, reading the messages file into a data frame, treating
the English text as row names. The messages could be handled by a function,
say Text(), which would return English or translated text, as appropriate.
Some experimentation shows that message retrieval by this scheme is
essentially instantaneous even when there are several thousand relatively
long messages in the data frame. 


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4

More information about the R-devel mailing list