From jfox at mcmaster.ca  Sat May 21 19:37:12 2005
From: jfox at mcmaster.ca (John Fox)
Date: Sat May 21 19:37:23 2005
Subject: [Rd] Internationalizing the Rcmdr package?
Message-ID: <20050521173712.ZFMI25800.tomts13-srv.bellnexxia.net@JohnDesktop8300>

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. 

Thanks,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox


[Rd] Internationalizing the Rcmdr package?
John Fox