Skip to content

translating output ( latex()....)

4 messages · Brian Ripley, Frank E Harrell Jr, Anne

#
Dear R-helpers

I need to produce statistical output where the annotations are in
French (and from time to time in German). I produce plots/tables using
extensively the latex() , summary.formula() ...functions of Hmisc
which allows me for nice print-out. Up to now I "corrected" manually
my latex code , replacing such headings as "missing" by "valeur
manquante" etc. Is there a (simple) way of updating the R functions
with the translated output? (I would of course gladly make it
available to the list)

I know my question will sound like an heresy to the vast majority of
statisticians and I agree it is a waste of statistician time to do
translations, but it is due to work related constraints (and I fear
the "anti-americanisme primaire" encountered in some european
countries)
#
R has since 2.1.0 had all the facilities one needs to mark up output for 
automated translation.  However, we did _choose_ not to do it.  One issue 
is layout: your French label is over twice as long as the English one. 
Another is that it is hard to translate single words like this out of 
context.

You could produce your own versions of the appropriate print() methods, 
probably most appropriately via a package.
On Mon, 22 Aug 2005, Anne wrote:

            

  
    
#
Anne wrote:
Anne,

If you were to use a general way to detect the language (using the new 
facilities that Brian Ripley mentioned) and wanted to use that to 
enhance print. and latex. methods for the summary.formula family of 
functions, and know or can learn how to use CVS, we will consider giving 
you access to the Hmisc CVS repository to make the enhancements you want.

Frank
#
Hi and thanks for the answers!

Prof Ripley, I totally agree with you about the problem of the length
of the labels in French and would be very happy to do all my work in
English (however consider that probably Chinese/Japanese labels could
be still more efficient with one character having all the info...).
I'm already very happy to be able to use R professionnally (it was not
an easy solution to impose); the problem is that I need some output
for official (State) purposes and have to do it in the official
languages of Switzerland.

Frank,
Up to now I never used CVS (bad habit of working and developping
alone) but am quite willing to learn. I would like ultmately to
enhance the print. and latex. methods for the summary.formula family
of Hmisc for French and perhaps German and Italian too as I do have to
produce official output in these languages.

Anne
 

2005/8/22, Frank E Harrell Jr <f.harrell at vanderbilt.edu>: