Kjetil Halvorsen
2011-Feb-22 19:36 UTC
[Rd] How to make a package with help pages in multiple languages?
This question was adsked on R-help-es, and got no responses there. the OP asked for help pages in english and spanish. Any ideas how this should be done? I guess there really should be a solution for any number of languages. Kjetil
Prof Brian Ripley
2011-Feb-22 20:34 UTC
[Rd] How to make a package with help pages in multiple languages?
On Tue, 22 Feb 2011, Kjetil Halvorsen wrote:> This question was adsked on R-help-es, and got no responses there. > the OP asked for help pages in english and spanish. Any ideas how this > should be done? I guess there really should be a solution for any number of > languages.Rcmdr had English and Spanish help overviews, as I recall, and now has PDFs in English, Spanish, Japanese and Russian. The short answer is that we don't have a way to do it, and we have a default encoding for a package which makes this awkward. I think I would simply prepare separate packages foo.en and foo.es which differed only in the man directory (and there are packages openNLPmodels.{en.es}). And although they do differ in detail, the two largest installed packages on CRAN are nutshell and nutshellDE. If there were enough demand and someone was prepared to put the work in, we could have man-es in the sources and help-es, html-es in the installed packages. But the amount of work would be non-trivial, as for example 'R CMD check' would have to check all the installed languages. But I suspect the demand is far too low to consider doing this.> > Kjetil > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Duncan Murdoch
2011-Feb-22 20:42 UTC
[Rd] How to make a package with help pages in multiple languages?
On 22/02/2011 2:36 PM, Kjetil Halvorsen wrote:> This question was adsked on R-help-es, and got no responses there. > the OP asked for help pages in english and spanish. Any ideas how this > should be done? I guess there really should be a solution for any number of > languages.I don't think there is any easy way to do this currently, but it would be a good idea. I think we would need a fair bit of work to add the support for it, so it's not likely to arrive soon unless someone is eager to do the work. Here are some thoughts: - Allow a type of package that contains language-specific documentation for another package or multiple packages. When such a package is attached, pages in it are shown in preference to the regular ones, with an automatic link to the regular one generated (in case the translation is out of date or incorrect). - Perhaps such a package is automatically attached when the original is attached, if the locale says to use that language? Duncan Murdoch
Apparently Analagous Threads
- Off-Topic: LaTeX package listings
- mgcv in R-2.4.0.alpha
- CompeticiÃn de classificación!!! Fwd: [R] Classification of supernovae - a challenge
- some questions about sympy (that is, rSymPy)
- How to get around heteroscedasticity with non-linear leas t squares in R?