[R-pkg-devel] Bilingual (English and Portuguese) documentation in an R package
murdoch.duncan at gmail.com
Sat May 21 01:06:01 CEST 2016
On 20/05/2016 3:39 PM, Lucas Ferreira Mation wrote:
> Note: this was posted in this Stack Overflow
> question, where I was advised to cross post here.
> I am writing a package to facilitate importing Brazilian socio-economic
> microdata sets (Census, PNAD, etc). I foresee two distinct groups of users
> of the package:
> Users in Brazil, who may feel more at ease with the documentation in
> Portuguese. The probably can understand English to some extent, but a
> foreign language would probably make the package feel less "ergonomic".
> The broader international users community, from whom English
> documentation may be a necessary condition.
> Is it possible to write a package in a way that the documentation is
> "bilingual" (English and Portuguese), and that the language shown to the
> user will depend on their country/language settings?
> Is that doable within the roxygen2 documentation framework?
> I realise there is a tradeoff of making the package more user-friendly by
> making it bilingual vs. the increased complexity and difficulty to
> maintain. General comments on this tradeoff from previous expirience are
> also welcome.
I don't think so. It is possible (and has been supported for a long
time, due to work by Brian Ripley) to have error and warning messages
translated, but we don't currently have a way to have other
documentation in multiple languages.
I would suggest that you write a vignette in Portuguese, which is
definitely possible, though there is no special support for that.
There has been some effort among the translation teams to implement
regular help files in other languages, but I don't know if it has
You could also write all your documentation in Portuguese in a separate
version of the package, and your Brazilian users would install that version.
More information about the R-package-devel