Skip to content

Creating translations

codeanticode edited this page Nov 14, 2019 · 4 revisions

To facilitate access to non-English speaking users, both the main website and the text messages in the Android mode itself can be translated into other languages. Contributions are enormously appreciated to make Processing for Android available in as many languages as possible.

Translating the website

The Processing for Android website is composed entirely of static html files, png, gif and jpg images, and css. Translations can be easily created off from the English pages and stored under a sub-folder from root with the ISO 639-1 2-letter language code as the name. In order to do that, please follow the steps below:

  1. Create a fork of the processing-android-website repo.
  2. Create a sub-folder with the 2-letter language code you want to add.
  3. Copy the html files located in the root of the repo to the new language sub-folder (index.html, install.html, team.html, and whatsnew.html), as well as the books, gallery, reference, and tutorials sub-folders. Now you have all the html files that need to be translated from English into the new language. No other files need to be modified.
  4. In addition to translating the text, make sure to update the image links. In order to avoid duplicating resources, all the images are located under the imgs sub-folder inside the root, and none under language-specific folders. Because the original English html files are directly under root, the image links in the translated files need to add a "directory-up" direction to the images' source URLs in order to be resolved correctly. for example, if the image source is "../imgs/logo.png" in the English file, it should be changed to "../../imgs/logo.png" in the corresponding translated html.
  5. Push your translated files to your forked repo, and then create a pull request against the master branch of the website's repo.

Once we receive the pull request with the translation, we will review it, merge into the repo, and update the live website if everything looks correct.

Translating the mode

The text in the user interface of the Android mode can also be translated into new languages. All the original text strings in English are stored in this properties file. All you need to do is to replace all the English strings by the corresponding translations (but not the name of the string, which should remain in English). Then you can create a pull request including the new properties file with the name being mode_XX.properties, where XX is the 2-letter language code.