{"id":16277064,"url":"https://github.com/eliocamp/rhelpi18n","last_synced_at":"2025-03-16T13:31:21.935Z","repository":{"id":192089803,"uuid":"686042849","full_name":"eliocamp/rhelpi18n","owner":"eliocamp","description":"Add support for multilingual documentation to R","archived":false,"fork":false,"pushed_at":"2024-11-05T05:16:07.000Z","size":1850,"stargazers_count":23,"open_issues_count":17,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T09:45:39.736Z","etag":null,"topics":["documentation","multilanguage","multilingual","r"],"latest_commit_sha":null,"homepage":"https://eliocamp.github.io/rhelpi18n/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliocamp.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-01T15:45:55.000Z","updated_at":"2024-11-05T05:14:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"58fa6e40-e69d-483b-b994-015aeac53197","html_url":"https://github.com/eliocamp/rhelpi18n","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"9514597589d667950eb4bfd14dbdb96dbb65ba90"},"previous_names":["eliocamp/rhelpi18n"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frhelpi18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frhelpi18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frhelpi18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Frhelpi18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliocamp","download_url":"https://codeload.github.com/eliocamp/rhelpi18n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243817117,"owners_count":20352501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","multilanguage","multilingual","r"],"created_at":"2024-10-10T18:52:25.035Z","updated_at":"2025-03-16T13:31:21.344Z","avatar_url":"https://github.com/eliocamp.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\n# Internationalisation of R help pages\n\nThis repository documents a proposal to support internationalisation of R help pages.\n\nThis project started at the 2023 R Project Sprint.\nMore [in this issue](https://github.com/r-devel/r-project-sprint-2023/issues/35).\n\n## For users\n\nInstall this package:\n\n``` r\npak::pak(\"eliocamp/rhelpi18n\")\n```\n\nNext install a translation module. \nThe [base.es](https://github.com/eliocamp/base.es) package hosts translations for `base::mean()` as an example, install it with\n\n``` r\npak::pak(\"eliocamp/base.es\")\n```\n\nSetting the LANGAUGE environmental variable to \"es\" will change your R language. \n\n```r\nlibrary(rhelpi18n)\nSys.setenv(LANGUAGE = \"es\")\n```\n\nNow `base::mean()`'s help page will be displayed in Spanish.\n\n\n\u003cvideo style=\"max-height:640px; min-height: 200px\" controls\u003e\n  \u003csource src=\"https://github.com/eliocamp/rhelpi18n/assets/8617595/be3038dd-ac53-4fa7-a0bf-51a5de9a91bf\" type=\"video/mp4\"\u003e\n\u003c/video\u003e\n\nThis will work with the HTML documentation displayed by R GUIs like RStudio, as well as with text documentation displayed by R in the console. \n\n## For package developers\n\nFirst get a copy of the package you want to translate. \n\nChoose your translation **language** by its [ISO 2-letter code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) eventually with a regional option using underscore:\n\nor example Spanish would be `language = \"es\"`, and Argentine Spanish would be `language = \"es_AR\"`.\n\nThen use `rhelpi18n::i18n_module_create()` to create a **lang** translation **module** for that **package**\n\n\n```r\nrhelpi18n::i18n_module_create(module_name = \"package.lang\", \n                              language = \"lang\", \n                              module_path = \"path/to/module\", \n                              package_path = \"path/to/package\")\n```\n\nThe translation string are saved into yaml files, one per Rd file of the original package.\n\nYou can find them in \"path/to/module/translations\" with this format:\n\n```yaml\ntitle:\n  original: Title in the original language\n  translation: ~\n```\nYou can distribute them to your package translators.\n\nAfter translation, replace the completed yaml files in the same folder.\n\nBuild the package and test. \n\nThat's it.\n\n## For package translators\n\nIn the received yaml files, replace the `~` in each `translation` field by the translation of the `original` field, like in the exemple: \n\n```yaml\ntitle:\n  original: Title in the original language\n  translation: Título en la lengua original\n```\n\n**Problems**\n\n1. It's not clear that the page is a translation and not the \"official\" one. \n2. It's not possible to access the original documentation without changing the LANGUAGE environmental variable and opening the help page again. \n3. There are some formatting issues, such as the `...` argument name. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Frhelpi18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliocamp%2Frhelpi18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Frhelpi18n/lists"}