6

My project's documentation is on a wiki where unfortunately every new contributor has to be validated by me beforehand, which is a pain. So I am considering switching to the GitHub wiki, in which anyone can start editing immediately.

PROBLEM: The GitHub wiki does not seem to have any internationalization features.

When a Japanese user visits the wiki, I would like the Japanese wiki to be shown.

Is there any way to do this with GitHub wiki? If not, can it be done with GitHub Pages?

3 Answers 3

3

It is currently not possible to easily do internationalisation for GitHub wiki pages and/or GitHub Pages, but you can if you do quite a bit of changes.

Lets say for example, the main working language in your repository is English. You can create pages in the wiki with the content in English (so the page called "Installation" will provide details on installing the software).

If you want to make your repository's wiki offer content in another language, I would suggest that you use prefixes to differentiate out the different languages. GitHub does not allow subpages in the wiki, so you can use something like "De:Installation" ("De" is the language code for German) to serve German content for the page on "Installation".

Of course, the wiki will always have a page called "Home" to serve as the entrance page. Use it to link to various other language homepages (e.g. "De:Home") and from there, link to the various other pages that starts with "De:".

Finally, send an announcement to everyone who collaborate with your project regarding this change so that they know how to create new pages in a language different from English.


For GitHub Pages, its purely using HTML to generate the website. Make use of that fact to create a website that can serve content in various languages. Upload your files to the "gh-pages" branch of your repository.

Hope this helps!

2

You could try using https://poeditor.com for i18n on Github. It has recently added a github integration features so you can connect your repositories with the translation platform.

1
  • It can not do localization of GitHub wikis in a productive way. If I am mistaken, please provide the steps and a screenshot showing how wiki localization looks like, thanks!
    – nic
    Commented Aug 2, 2018 at 1:45
2

Good question, @nic. I didn't found any official documentation about GitHub Wiki internationalization/localization, but I found an example of internationalized/localized Wiki on GitHub: JustArchi/ArchiSteamFarm/wiki So you can clone a wiki repo and you can see the structure. There is even localized "_Sidebar". After "git clone ..." you will see a folder "locale" and many language folders inside ("fr-FR", "de-DE", "uk-UA"). I recommend you to create a similar directories tree.

1
  • 1
    Perfect, undocumented feature. Beware to use exactly the same structure and naming convention Commented May 1, 2020 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.