Skip to content

eliocamp/rhelpi18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lifecycle: experimental

Internationalisation of R help pages

This repository documents a proposal to support internationalisation of R help pages.

This project started at the 2023 R Project Sprint. More in this issue.

Working prototype

Translations are hosted in "translation modules", which are regular packages. For now, these are in an exported object called translations.

The dummy.es package hosts translations for base::mean().

Install both packages and this one with

pak::pak(c("eliocamp/rhelpi18n", "eliocamp/ri18n-dummy.es"))

Loading rhelpi18n will modify the internal R function that retrieves help pages to enable translation. Setting the LANGAUGE environmental variable to "es" will change your R language.

library(rhelpi18n)
Sys.setenv(LANGUAGE = "es")

Now base::mean()'s help page will be displayed in Spanish.

ayuda-2024-02-22_19.10.05.mp4

This will work with the HTML documentation displayed by R GUIs like RStudio, as well as with text documentation displayed by R in the console.

Problems

  1. It's not clear that the page is a translation and not the "official" one.
  2. It's not possible to access the original documentation without changing the LANGUAGE environmental variable and opening the help page again.
  3. There are some formatting issues, such as the ... argument name.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages